summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-09-22 02:08:54 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-09-22 02:08:54 (GMT)
commit8c8ae76bf5ba6fdc01ce73ff6988064b86e48a9d (patch)
treebdc348ec43b98a67a08790f414c72f0c6b52d9bc /src/H5AC.c
parented9584cc92e4eb561ad47636c3ce87836a2ad8f0 (diff)
downloadhdf5-8c8ae76bf5ba6fdc01ce73ff6988064b86e48a9d.zip
hdf5-8c8ae76bf5ba6fdc01ce73ff6988064b86e48a9d.tar.gz
hdf5-8c8ae76bf5ba6fdc01ce73ff6988064b86e48a9d.tar.bz2
[svn-r106] Fixed some symbol table bugs. Fixed a free memory read in H5Osdim.c.
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 9dc49ed..d82cb6f 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -310,7 +310,8 @@ H5AC_compare (const void *_a, const void *_b)
*
* Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL if there was a request to flush all
+ * items and something was protected.
*
* Programmer: Robb Matzke
* matzke@llnl.gov
@@ -374,6 +375,14 @@ H5AC_flush (hdf5_file_t *f, const H5AC_class_t *type, haddr_t addr,
}
map = H5MM_xfree (map);
+ /*
+ * If there are protected object then fail. However, everything
+ * else should have been flushed.
+ */
+ if (f->cache->nprots>0) {
+ HRETURN_ERROR (H5E_CACHE, H5E_PROTECT, FAIL);
+ }
+
} else if ((!type || f->cache->slot[i].type==type) &&
f->cache->slot[i].addr==addr) {
/*
@@ -389,14 +398,6 @@ H5AC_flush (hdf5_file_t *f, const H5AC_class_t *type, haddr_t addr,
}
- /*
- * If there are protected objects then fail. However, everything
- * else should have been flushed.
- */
- if (f->cache->nprots>0) {
- HRETURN_ERROR (H5E_CACHE, H5E_PROTECT, FAIL);
- }
-
FUNC_LEAVE (SUCCEED);
}