diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDlog.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 0e3c562..1f28d0a 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -324,10 +324,13 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si FUNC_ENTER_API(H5Pset_fapl_log, FAIL) H5TRACE4("e", "i*sULz", fapl_id, logfile, flags, buf_size); + /* Check arguments */ if(NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") - fa.logfile = (char *)logfile; + /* Deep copy the log filename */ + fa.logfile = H5MM_xstrdup(logfile); + fa.flags = flags; fa.buf_size = buf_size; ret_value = H5P_set_driver(plist, H5FD_LOG, &fa); |