ECC-1172: BUFR encoding memory leaks (Final part 2)

This commit is contained in:
Shahram Najm 2022-12-20 18:41:27 +00:00
parent 1bc5041eef
commit f6ff36c09a
1 changed files with 1 additions and 0 deletions

View File

@ -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++) {