diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-09-16 10:34:25 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-09-16 10:34:25 (GMT) |
commit | cc0165a973d17386cd4983ac1d0394ad4feb8034 (patch) | |
tree | 47c0839db019c336beeae779a6030f85869eb97f /hl/src/H5IM.c | |
parent | 183ba43b41674c3d8912cb3759bc57fa846155ed (diff) | |
download | hdf5-cc0165a973d17386cd4983ac1d0394ad4feb8034.zip hdf5-cc0165a973d17386cd4983ac1d0394ad4feb8034.tar.gz hdf5-cc0165a973d17386cd4983ac1d0394ad4feb8034.tar.bz2 |
[svn-r27799] Minor warning fixes in the high-level library.
Tested on: jam (too minor for h5committest)
Diffstat (limited to 'hl/src/H5IM.c')
-rw-r--r-- | hl/src/H5IM.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 6fa548d..6d08f02 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -255,12 +255,12 @@ herr_t H5IMget_image_info( hid_t loc_id, char *interlace, hssize_t *npals ) { - hid_t did; - hid_t sid; + hid_t did = -1; + hid_t sid = -1; hsize_t dims[IMAGE24_RANK]; - hid_t aid; - hid_t asid; - hid_t atid; + hid_t aid = -1; + hid_t asid = -1; + hid_t atid = -1; H5T_class_t aclass; int has_pal; int has_attr; @@ -396,10 +396,14 @@ herr_t H5IMget_image_info( hid_t loc_id, return 0; out: - H5Dclose( did ); - H5Aclose( aid ); - H5Sclose( asid ); - H5Tclose( atid ); + if(did > 0) + H5Dclose( did ); + if(aid > 0) + H5Aclose( aid ); + if(asid > 0) + H5Sclose( asid ); + if(atid > 0) + H5Tclose( atid ); return -1; } |