Memory leaks in grib_merge tool

This commit is contained in:
Shahram Najm 2020-07-12 16:55:26 +01:00
parent 386e0764c5
commit 94d4f83ec7
1 changed files with 10 additions and 0 deletions

View File

@ -318,6 +318,16 @@ static grib_handle* merge(grib_handle* h1, grib_handle* h2)
grib_set_double_array(h, "values", v, n);
grib_context_free(h->context, v);
grib_context_free(h->context, v1);
grib_context_free(h->context, v2);
grib_context_free(h->context, lat);
grib_context_free(h->context, lat1);
grib_context_free(h->context, lat2);
grib_context_free(h->context, lon);
grib_context_free(h->context, lon1);
grib_context_free(h->context, lon2);
return h;
}