BUFR encoding memory leaks (Final part 2)
@@ -332,6 +332,7 @@ static int pack_string_array(grib_accessor* a, const char** v, size_t* len)
self->descriptors->v[self->elementsDescriptorsIndex->v[0]->v[idx]]->shortName, *len, self->numberOfSubsets);
return GRIB_ARRAY_TOO_SMALL;
}
+ grib_sarray_delete_content(c, self->stringValues->v[idx]); /* ECC-1172 */
grib_sarray_delete(c, self->stringValues->v[idx]);
self->stringValues->v[idx] = grib_sarray_new(c, *len, 1);
for (i = 0; i < *len; i++) {
