summaryrefslogtreecommitdiffstats
path: root/src/H5Clog.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/H5Clog.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/H5Clog.c')
-rw-r--r--src/H5Clog.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/H5Clog.c b/src/H5Clog.c
index 0ae7f13..cf9b7e8 100644
--- a/src/H5Clog.c
+++ b/src/H5Clog.c
@@ -887,7 +887,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_log_write_unprotect_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry,
+H5C_log_write_unprotect_entry_msg(H5C_t *cache, haddr_t address,
int type_id, unsigned flags, herr_t fxn_ret_value)
{
herr_t ret_value = SUCCEED;
@@ -898,9 +898,8 @@ H5C_log_write_unprotect_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry,
HDassert(cache);
/* Write a log message */
- HDassert(entry);
if(cache->log_info->cls->write_unprotect_entry_log_msg)
- if(cache->log_info->cls->write_unprotect_entry_log_msg(cache->log_info->udata, entry, type_id, flags, fxn_ret_value) < 0)
+ if(cache->log_info->cls->write_unprotect_entry_log_msg(cache->log_info->udata, address, type_id, flags, fxn_ret_value) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific unprotect entry call failed")
done: