Fix memory leak

This commit is contained in:
Shahram Najm 2021-03-11 15:19:30 +00:00
parent d0b4e1f0ea
commit 944a7838ee
1 changed files with 3 additions and 1 deletions

View File

@ -127,9 +127,11 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
if (options->set_values_count != 0) {
err = grib_set_values(h, options->set_values, options->set_values_count);
if (err != GRIB_SUCCESS && options->fail)
if (err != GRIB_SUCCESS && options->fail) {
free(v);
exit(err);
}
}
if (options->repack) {
if (grib_options_on("d:")) {