summaryrefslogtreecommitdiffstats
path: root/src/H5FDlog.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-01-05 03:28:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-01-05 03:28:43 (GMT)
commit4c5bb2b8db3c16c9ec7a3f7f7eebf7fbeac8c48b (patch)
tree5a05c3a747fddff205109254a69f5a9683336e80 /src/H5FDlog.c
parent3e0e79aa6eaa26106d22c0b860d523fe945cb0ac (diff)
downloadhdf5-4c5bb2b8db3c16c9ec7a3f7f7eebf7fbeac8c48b.zip
hdf5-4c5bb2b8db3c16c9ec7a3f7f7eebf7fbeac8c48b.tar.gz
hdf5-4c5bb2b8db3c16c9ec7a3f7f7eebf7fbeac8c48b.tar.bz2
[svn-r28797] Description:
Clean up another round of memory allocation mis-matches. Tested on: Linux/32 2.6.x (jam) w/serial MacOSX/64 10.11.2 (amazon) w/serial & parallel
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r--src/H5FDlog.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index a8228e0..435ee70 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -406,7 +406,7 @@ H5FD_log_fapl_copy(const void *_old_fa)
/* Deep copy the log file name */
if(old_fa->logfile != NULL)
- if(NULL == (new_fa->logfile = H5MM_xstrdup(old_fa->logfile)))
+ if(NULL == (new_fa->logfile = H5MM_strdup(old_fa->logfile)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate log file name")
/* Set return value */
@@ -416,7 +416,7 @@ done:
if(NULL == ret_value)
if(new_fa) {
if(new_fa->logfile)
- H5MM_free(new_fa->logfile);
+ new_fa->logfile = H5MM_free(new_fa->logfile);
H5MM_free(new_fa);
} /* end if */
@@ -445,7 +445,7 @@ H5FD_log_fapl_free(void *_fa)
/* Free the fapl information */
if(fa->logfile)
- H5MM_xfree(fa->logfile);
+ fa->logfile = H5MM_free(fa->logfile);
H5MM_xfree(fa);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -594,7 +594,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
/* Get the flags for logging */
file->fa.flags = fa->flags;
if(fa->logfile)
- file->fa.logfile = HDstrdup(fa->logfile);
+ file->fa.logfile = H5MM_strdup(fa->logfile);
else
file->fa.logfile = NULL;
file->fa.buf_size = fa->buf_size;
@@ -798,10 +798,8 @@ H5FD_log_close(H5FD_t *_file)
HDfclose(file->logfp);
} /* end if */
- if(file->fa.logfile) {
- HDfree(file->fa.logfile);
- file->fa.logfile = NULL;
- }
+ if(file->fa.logfile)
+ file->fa.logfile = H5MM_free(file->fa.logfile);
/* Release the file info */
file = H5FL_FREE(H5FD_log_t, file);