Fix memory leak

This commit is contained in:
Eugen Betke 2024-10-23 15:30:56 +02:00
parent e8fceb68d6
commit cc3d8c035a
1 changed files with 1 additions and 0 deletions

View File

@ -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];