summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-10-16 15:40:37 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-10-16 15:40:37 (GMT)
commit80f20333264434b449ba014161899a6d7b522b98 (patch)
tree0188b179ec625f3aeea1ee349e7dc53b1598c283 /src/H5O.c
parent194c45d07d5fd876e6ada1e27148035f223a0e29 (diff)
downloadhdf5-80f20333264434b449ba014161899a6d7b522b98.zip
hdf5-80f20333264434b449ba014161899a6d7b522b98.tar.gz
hdf5-80f20333264434b449ba014161899a6d7b522b98.tar.bz2
[svn-r764] Changes since 19981014
---------------------- ./bin/trace ./src/H5.c ./src/H5F.c ./src/H5Fprivate.h ./src/H5Fpublic.h Added a `scope' argument to H5Fflush() which should be either H5F_SCOPE_LOCAL or H5F_SCOPE_GLOBAL and determines which files are flushed (just the specified file or the entire virtual file). ./src/H5F.c Added reference counts to the H5F_t struct so we get the correct behavior between H5Funmount() and H5Fclose(). ./src/H5O.c Fixed a memory leak that happens during error handling. ./test/cmpd_dset.c ./test/unlink.c Fixed a memory leak. ./test/mount.c Enabled the H5Fclose() test.
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5O.c b/src/H5O.c
index 4386962..0902b1c 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1189,7 +1189,6 @@ H5O_modify(H5G_entry_t *ent, const H5O_class_t *type, intn overwrite,
*/
H5E_clear ();
flags &= ~H5O_FLAG_SHARED;
- H5MM_xfree (sh_mesg);
} else if (sh_mesg->in_gh) {
/*
* The shared message is stored in the global heap.
@@ -1245,6 +1244,7 @@ H5O_modify(H5G_entry_t *ent, const H5O_class_t *type, intn overwrite,
/* Copy the native value into the object header */
if (flags & H5O_FLAG_SHARED) {
oh->mesg[idx].native = sh_mesg;
+ sh_mesg = NULL;
} else {
if (oh->mesg[idx].native) {
H5O_reset (oh->mesg[idx].type, oh->mesg[idx].native);
@@ -1265,6 +1265,7 @@ H5O_modify(H5G_entry_t *ent, const H5O_class_t *type, intn overwrite,
ret_value = sequence;
done:
+ H5MM_xfree(sh_mesg);
if (oh && H5AC_unprotect(ent->file, H5AC_OHDR, &(ent->header), oh) < 0) {
HRETURN_ERROR(H5E_OHDR, H5E_PROTECT, FAIL,
"unable to release object header");