summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-01-31 08:14:11 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-01-31 08:14:11 (GMT)
commit99d70c494d72bed9c2961348a659696090752ac5 (patch)
treebcc7f3e71a8cc0eff7d6f0d9f5379c4b316480bf /src/H5AC.c
parent90bf59edc59bfabb38d677dc6bddb12eb57e8b11 (diff)
downloadhdf5-99d70c494d72bed9c2961348a659696090752ac5.zip
hdf5-99d70c494d72bed9c2961348a659696090752ac5.tar.gz
hdf5-99d70c494d72bed9c2961348a659696090752ac5.tar.bz2
Fixed a valgrind issue with the unprotect log message. The logging
call was placed after the point where the cache entry was freed. The fix was to just use the entry's address directly in the log call instead of the entry itself.
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 0a5411a..e1838fb 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -1612,7 +1612,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
done:
/* If currently logging, generate a message */
if(f->shared->cache->log_info->logging)
- if(H5C_log_write_unprotect_entry_msg(f->shared->cache, (H5AC_info_t *)thing, type->id, flags, ret_value) < 0)
+ if(H5C_log_write_unprotect_entry_msg(f->shared->cache, addr, type->id, flags, ret_value) < 0)
HDONE_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message")
FUNC_LEAVE_NOAPI(ret_value)