summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-09-27 03:46:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-09-27 03:46:39 (GMT)
commit1d02d3268e562063172604fb2c8b0a72733bc172 (patch)
tree18453127e699d176220ea85e528c16cdaefba6e3
parent183c8245af3a43d2f07845a0ac717f558afa3d1c (diff)
downloadhdf5-1d02d3268e562063172604fb2c8b0a72733bc172.zip
hdf5-1d02d3268e562063172604fb2c8b0a72733bc172.tar.gz
hdf5-1d02d3268e562063172604fb2c8b0a72733bc172.tar.bz2
[svn-r2601] Purpose:
Bug Fix Description: The core and log VFL drivers were leaking small amounts of memory when they were used. Solution: Free the appropriate memory block (for the core driver) and don't allocate a block (for the log driver). Platforms tested: Solaris 2.6 (i.e. baldric)
-rw-r--r--src/H5FDcore.c1
-rw-r--r--src/H5FDlog.c7
2 files changed, 3 insertions, 5 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 24711af..b923861 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -411,6 +411,7 @@ H5FD_core_close(H5FD_t *_file)
if (file->name) H5MM_xfree(file->name);
if (file->mem) H5MM_xfree(file->mem);
memset(file, 0, sizeof(H5FD_core_t));
+ H5MM_xfree(file);
FUNC_LEAVE(0);
}
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 1fc7c5c..9c81125 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -183,7 +183,7 @@ static const H5FD_class_t H5FD_log_g = {
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
- sizeof(char *), /*fapl_size */
+ sizeof(H5FD_log_fapl_t), /*fapl_size */
H5FD_log_fapl_get, /*fapl_get */
H5FD_log_fapl_copy, /*fapl_copy */
H5FD_log_fapl_free, /*fapl_free */
@@ -268,10 +268,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, int verbosity)
if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id))
HRETURN_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl");
- if(logfile!=NULL)
- fa.logfile = H5MM_xstrdup(logfile);
- else
- fa.logfile = NULL;
+ fa.logfile = logfile;
fa.verbosity=verbosity;
ret_value= H5Pset_driver(fapl_id, H5FD_LOG, &fa);