summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_dump.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-09-21 02:18:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-09-21 02:18:45 (GMT)
commit0695d6366a670e1dd9b6b0ca463feec12ab659d7 (patch)
treebaf248c43e42f8a479fb46dd21a916180575ac9b /tools/lib/h5tools_dump.c
parent68659dd411a8ca3b0b2ef86eaaa7d5ba5d5bc449 (diff)
parent8fc9a9ba251ea34ac5a943ad8eb7f6cf012b929d (diff)
downloadhdf5-0695d6366a670e1dd9b6b0ca463feec12ab659d7.zip
hdf5-0695d6366a670e1dd9b6b0ca463feec12ab659d7.tar.gz
hdf5-0695d6366a670e1dd9b6b0ca463feec12ab659d7.tar.bz2
[svn-r27835] Description:
Sync w/trunk. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest not required on this branch)
Diffstat (limited to 'tools/lib/h5tools_dump.c')
-rw-r--r--tools/lib/h5tools_dump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 2afe3e4..7928dfb 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -943,8 +943,8 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
hsize_t *ptdata;
int ndims;
hssize_t indx;
- hid_t dtype;
- hid_t type_id;
+ hid_t dtype = -1;
+ hid_t type_id = -1;
HDassert(info);
HDassert(ctx);
@@ -1065,10 +1065,10 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
done:
HDfree(ptdata);
- if(H5Tclose(type_id) < 0)
+ if(type_id > 0 && H5Tclose(type_id) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
- if(H5Tclose(dtype) < 0)
+ if(dtype > 0 && H5Tclose(dtype) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
ctx->need_prefix = TRUE;