summaryrefslogtreecommitdiffstats
path: root/src/H5E.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2008-08-28 22:08:06 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2008-08-28 22:08:06 (GMT)
commitca4379362b95dc8cc81152b8d994b72e7ca65eea (patch)
tree1fb151f8a3198ccb47f7998555d35f55031265ae /src/H5E.c
parent6803ed3729c32e326324cebcb0149c63dab9dc27 (diff)
downloadhdf5-ca4379362b95dc8cc81152b8d994b72e7ca65eea.zip
hdf5-ca4379362b95dc8cc81152b8d994b72e7ca65eea.tar.gz
hdf5-ca4379362b95dc8cc81152b8d994b72e7ca65eea.tar.bz2
[svn-r15553] Fix potential memory leak in H5E_close_msg_cb.
Tested: kagiso
Diffstat (limited to 'src/H5E.c')
-rw-r--r--src/H5E.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5E.c b/src/H5E.c
index 7112d6e..c08fa94 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -615,9 +615,12 @@ H5E_close_msg_cb(void *obj_ptr, hid_t obj_id, void *key)
HDassert(err_msg);
/* Close the message if it is in the class being closed */
- if(err_msg->cls == cls)
+ if(err_msg->cls == cls) {
+ if(H5E_close_msg(err_msg) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTCLOSEOBJ, FAIL, "unable to close error message")
if(NULL == H5I_remove(obj_id))
HGOTO_ERROR(H5E_ERROR, H5E_CANTREMOVE, FAIL, "unable to remove error message")
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)