summaryrefslogtreecommitdiffstats
path: root/src/H5Groot.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2010-02-17 17:45:37 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2010-02-17 17:45:37 (GMT)
commit88c692130081999896f690fc2b9b0bf9c3a02d9f (patch)
tree80a1cf32f5a0bcfc10a78771c5696e9320f46944 /src/H5Groot.c
parentad9e876b0c767c97fdbef57509f3395768e58b44 (diff)
downloadhdf5-88c692130081999896f690fc2b9b0bf9c3a02d9f.zip
hdf5-88c692130081999896f690fc2b9b0bf9c3a02d9f.tar.gz
hdf5-88c692130081999896f690fc2b9b0bf9c3a02d9f.tar.bz2
[svn-r18269] Bug fix for #1732 - The library had segmentation fault when tools call H5Close() after trying
to open corrupted files. The problem turned out to be some memory leak when the library failed to open the file. The solution is simply moving some code around to their proper places - moving H5AC_unpin_entry(f->shared->sblock) in H5F_dest of H5F.c and moving H5G_name_free(root_loc.path) in H5G_mkroot of H5Groot.c. Tested on jam. Tested the same change for 1.8. M src/H5F.c M src/H5Groot.c
Diffstat (limited to 'src/H5Groot.c')
-rw-r--r--src/H5Groot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Groot.c b/src/H5Groot.c
index e4cdc46..04f0e1a 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -250,13 +250,13 @@ done:
* allocated */
if(ret_value < 0) {
if(f->shared->root_grp) {
+ H5G_name_free(root_loc.path);
if(f->shared->root_grp->shared)
f->shared->root_grp->shared = H5FL_FREE(H5G_shared_t, f->shared->root_grp->shared);
f->shared->root_grp = H5FL_FREE(H5G_t, f->shared->root_grp);
} /* end if */
if(f->shared->sblock)
f->shared->sblock->root_ent = (H5G_entry_t *)H5MM_xfree(f->shared->sblock->root_ent);
- H5G_name_free(root_loc.path);
} /* end if */
/* Mark superblock dirty in cache, if necessary */