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

This commit is contained in:
Shahram Najm 2022-12-20 18:13:03 +00:00
parent 9b785a2fb8
commit 1bc5041eef
1 changed files with 1 additions and 0 deletions

View File

@ -429,6 +429,7 @@ static int pack_string(grib_accessor* a, const char* val, size_t* len)
else {
idx = (int)self->numericValues->v[self->subsetNumber]->v[self->index] / 1000 - 1;
}
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, 1, 1);
s = grib_context_strdup(c, val);