diff --git a/src/grib_accessor_class_bufr_data_element.c b/src/grib_accessor_class_bufr_data_element.c index 15d9b8f13..004b705c4 100644 --- a/src/grib_accessor_class_bufr_data_element.c +++ b/src/grib_accessor_class_bufr_data_element.c @@ -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++) {