Examples: fix memory leak

This commit is contained in:
Shahram Najm 2020-01-23 12:17:03 +00:00
parent 51d6d7822c
commit 924d6774d5
1 changed files with 1 additions and 0 deletions

View File

@ -138,6 +138,7 @@ int main(int argc, char** argv)
CODES_CHECK(codes_get_size(h, name, &keySize), 0);
byte_val = (unsigned char*)malloc(keySize * sizeof(char));
GRIB_CHECK(codes_get_bytes(h, name, byte_val, &keySize), name);
free(byte_val);
}
codes_handle_delete(h);