diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2000-09-27 03:46:39 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2000-09-27 03:46:39 (GMT) |
commit | 1d02d3268e562063172604fb2c8b0a72733bc172 (patch) | |
tree | 18453127e699d176220ea85e528c16cdaefba6e3 /src/H5FDlog.c | |
parent | 183c8245af3a43d2f07845a0ac717f558afa3d1c (diff) | |
download | hdf5-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)
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r-- | src/H5FDlog.c | 7 |
1 files changed, 2 insertions, 5 deletions
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); |