summaryrefslogtreecommitdiffstats
path: root/tools/test/h5repack/h5repacktst.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-11-07 21:20:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-11-07 21:20:28 (GMT)
commit140f72b74847822e50bd10bb7051049b77f59abb (patch)
treed6f2af86ac3f1edd21414d97de1771fb382d742d /tools/test/h5repack/h5repacktst.c
parentef9ffc630ab6449230bb3fec29583264a6c1fe18 (diff)
parent40338b9e40b980eb4bb709e4f36661d7620d9a1f (diff)
downloadhdf5-140f72b74847822e50bd10bb7051049b77f59abb.zip
hdf5-140f72b74847822e50bd10bb7051049b77f59abb.tar.gz
hdf5-140f72b74847822e50bd10bb7051049b77f59abb.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into stackable_vol
Diffstat (limited to 'tools/test/h5repack/h5repacktst.c')
-rw-r--r--tools/test/h5repack/h5repacktst.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index f6166da..0ae570b 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -3728,7 +3728,7 @@ out:
H5Pclose(fcpl);
H5Fclose(fid);
} H5E_END_TRY;
- if(fd > 0)
+ if(fd >= 0)
HDclose(fd);
return -1;
@@ -3797,7 +3797,7 @@ out:
H5Pclose(fcpl);
H5Fclose(fid);
} H5E_END_TRY;
- if(fd > 0)
+ if(fd >= 0)
HDclose(fd);
return -1;
@@ -3838,7 +3838,7 @@ make_userblock_file(void)
out:
- if(fd > 0)
+ if(fd >= 0)
HDclose(fd);
return -1;
@@ -4134,13 +4134,19 @@ int write_dset_in(hid_t loc_id,
}
/* create a type larger than TEST_BUFSIZE */
- if ((tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, 1, tdims)) < 0)
+ if ((tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, 1, tdims)) < 0) {
+ HDfree(dbuf);
goto out;
+ }
size = H5Tget_size(tid);
- if ((sid = H5Screate_simple(1, sdims, NULL)) < 0)
+ if ((sid = H5Screate_simple(1, sdims, NULL)) < 0) {
+ HDfree(dbuf);
goto out;
- if ((did = H5Dcreate2(loc_id, "arrayd", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ }
+ if ((did = H5Dcreate2(loc_id, "arrayd", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
+ HDfree(dbuf);
goto out;
+ }
#if defined(WRITE_ARRAY)
H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf);
#endif
@@ -4149,7 +4155,7 @@ int write_dset_in(hid_t loc_id,
H5Dclose(did);
H5Tclose(tid);
H5Sclose(sid);
- HDfree( dbuf );
+ HDfree(dbuf);
}
/*-------------------------------------------------------------------------