diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2006-09-05 23:36:01 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2006-09-05 23:36:01 (GMT) |
commit | d553c60eb0428adaa3b1d9c647a1b465b65b8408 (patch) | |
tree | 8ec4ab3b924f14a9f78f53402b7405976b055a80 /src/H5Gtraverse.c | |
parent | 46467e91b0c96f368b2ac75569dfab2d3a097ef8 (diff) | |
download | hdf5-d553c60eb0428adaa3b1d9c647a1b465b65b8408.zip hdf5-d553c60eb0428adaa3b1d9c647a1b465b65b8408.tar.gz hdf5-d553c60eb0428adaa3b1d9c647a1b465b65b8408.tar.bz2 |
[svn-r12650] Description:
Purify found some memory leaks in the code related to the HDF5 external links.
James provided the fix and asked me to check it in.
Tested:
heping, mir, shanti, and juniper
Diffstat (limited to 'src/H5Gtraverse.c')
-rw-r--r-- | src/H5Gtraverse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 4128604..acdd665 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -555,6 +555,8 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, /* Free information for link (but don't free link pointer) */ if(lnk.type == H5L_LINK_SOFT) lnk.u.soft.name = H5MM_xfree(lnk.u.soft.name); + else if(lnk.type >= H5L_LINK_UD_MIN && lnk.u.ud.size > 0) + lnk.u.ud.udata = H5MM_xfree(lnk.u.ud.udata); lnk.name = H5MM_xfree(lnk.name); #endif /* H5_GROUP_REVISION */ link_valid = FALSE; @@ -751,6 +753,8 @@ done: /* Free information for link (but don't free link pointer) */ if(lnk.type == H5L_LINK_SOFT) lnk.u.soft.name = H5MM_xfree(lnk.u.soft.name); + else if(lnk.type >= H5L_LINK_UD_MIN && lnk.u.ud.size > 0) + lnk.u.ud.udata = H5MM_xfree(lnk.u.ud.udata); lnk.name = H5MM_xfree(lnk.name); #endif /* H5_GROUP_REVISION */ } /* end if */ |