From cc3d8c035a494c171c54d97e2a26483312ef898b Mon Sep 17 00:00:00 2001 From: Eugen Betke Date: Wed, 23 Oct 2024 15:30:56 +0200 Subject: [PATCH] Fix memory leak --- src/accessor/grib_accessor_class_bufr_data_array.cc | 1 + 1 file changed, 1 insertion(+) 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];