Tests: Fix memory leaks

This commit is contained in:
Shahram Najm 2020-02-10 10:58:53 +00:00
parent a1bc355249
commit f626d05184
2 changed files with 2 additions and 0 deletions

View File

@ -1463,6 +1463,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
default: default:
fprintf(stderr, "invalid packing_spec->accuracy = %ld\n", (long)packing_spec->accuracy); fprintf(stderr, "invalid packing_spec->accuracy = %ld\n", (long)packing_spec->accuracy);
grib_handle_delete(tmp);
*err = GRIB_INTERNAL_ERROR; *err = GRIB_INTERNAL_ERROR;
goto cleanup; goto cleanup;
break; break;

View File

@ -242,6 +242,7 @@ static void test_regular_ll(int remove_local_def, int edition, const char* packi
} }
codes_handle_delete(handle); codes_handle_delete(handle);
codes_handle_delete(finalh); codes_handle_delete(finalh);
free(values);
fclose(in); fclose(in);
fclose(out); fclose(out);
} }