diff --git a/src/accessor/grib_accessor_class_bufr_data_array.cc b/src/accessor/grib_accessor_class_bufr_data_array.cc index 4046dee56..80bae77e7 100644 --- a/src/accessor/grib_accessor_class_bufr_data_array.cc +++ b/src/accessor/grib_accessor_class_bufr_data_array.cc @@ -2845,6 +2845,7 @@ int grib_accessor_bufr_data_array_t::process_elements(int flag, long onlySubset, } else { if (elementsDescriptorsIndex_ == NULL) { + grib_buffer_delete(c, buffer); return GRIB_ENCODING_ERROR; /* See ECC-359 */ } elementsDescriptorsIndex = elementsDescriptorsIndex_->v[iss];