diff options
author | Robb Matzke <matzke@llnl.gov> | 1997-09-22 02:08:54 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1997-09-22 02:08:54 (GMT) |
commit | 8c8ae76bf5ba6fdc01ce73ff6988064b86e48a9d (patch) | |
tree | bdc348ec43b98a67a08790f414c72f0c6b52d9bc /src/H5AC.c | |
parent | ed9584cc92e4eb561ad47636c3ce87836a2ad8f0 (diff) | |
download | hdf5-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.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -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); } |