summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5I.c b/src/H5I.c
index 028108f..b958a3e 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -640,7 +640,12 @@ H5I_dec_ref(hid_t id)
* call the user's 'free' function for the atom's information,
* otherwise just leak memory.
*/
- if (grp_ptr->free_func) (grp_ptr->free_func)(obj);
+ if (grp_ptr->free_func) {
+ if ((grp_ptr->free_func)(obj)<0) {
+ HRETURN_ERROR (H5E_ATOM, H5E_CANTINIT, FAIL,
+ "unable to free atom");
+ }
+ }
}
ret_value = SUCCEED;
}