Skip to content

Commit

Permalink
Modernisation: Fix grib_iterator_delete()
Browse files Browse the repository at this point in the history
  • Loading branch information
joobog committed Oct 17, 2024
1 parent 2bd5482 commit a8f43e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/iterator/grib_iterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ grib_iterator* grib_iterator_new(const grib_handle* ch, unsigned long flags, int

int grib_iterator_delete(grib_iterator* i)
{
if (i) { // TODO(maee): check if this is necessary
grib_context* c = i->iterator->context_; // TODO(maee): find a better solution
if (i) {
grib_context* c = grib_context_get_default();
gribIteratorDelete(i->iterator);
grib_context_free(c, i);
}
return 0;
return GRIB_SUCCESS;
}

#else
Expand Down

0 comments on commit a8f43e9

Please sign in to comment.