diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-10-23 18:04:27 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-10-23 18:04:27 (GMT) |
commit | e7303eb36a8b91da758e8dbe1fe019934e897fdd (patch) | |
tree | 1e139f6e38c15574ebb1a7fd9266a6f53b2f1ba2 | |
parent | ba6cdfdd0eeeca594c48651f82170e38c9847a23 (diff) | |
parent | 1743470502095271be64a20d80dc53f085e75a09 (diff) | |
download | hdf5-e7303eb36a8b91da758e8dbe1fe019934e897fdd.zip hdf5-e7303eb36a8b91da758e8dbe1fe019934e897fdd.tar.gz hdf5-e7303eb36a8b91da758e8dbe1fe019934e897fdd.tar.bz2 |
Merge pull request #720 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '1743470502095271be64a20d80dc53f085e75a09':
HDFFV-10297 Free buffer inside loop
-rw-r--r-- | tools/src/h5repack/h5repack_copy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index fa72cfe..a85ef08 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -927,6 +927,11 @@ int do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, if (TRUE == H5Tdetect_class(wtype_id, H5T_VLEN)) if (H5Dvlen_reclaim(wtype_id, f_space_id, H5P_DEFAULT, buf) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dvlen_reclaim failed"); + /* free */ + if (buf != NULL) { + HDfree(buf); + buf = NULL; + } } else { /* possibly not enough memory, read/write by hyperslabs */ size_t p_type_nbytes = msize; /*size of memory type */ |