mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
Patch a few holes in the Splitter VFD implementation.
* Missing logfile close on driver-open failure. * Initialize empty string in test/vfd (logfile path in W/O compat check).
This commit is contained in:
parent
f745476aa5
commit
6462c67b65
@ -818,6 +818,9 @@ done:
|
|||||||
if (file_ptr->wo_file) {
|
if (file_ptr->wo_file) {
|
||||||
H5FD_close(file_ptr->wo_file);
|
H5FD_close(file_ptr->wo_file);
|
||||||
}
|
}
|
||||||
|
if (file_ptr->logfp) {
|
||||||
|
HDfclose(file_ptr->logfp);
|
||||||
|
}
|
||||||
H5FL_FREE(H5FD_splitter_t, file_ptr);
|
H5FL_FREE(H5FD_splitter_t, file_ptr);
|
||||||
}
|
}
|
||||||
} /* end if error */
|
} /* end if error */
|
||||||
|
@ -2490,7 +2490,7 @@ driver_is_splitter_compatible(hid_t fapl_id)
|
|||||||
{
|
{
|
||||||
H5FD_splitter_vfd_config_t vfd_config;
|
H5FD_splitter_vfd_config_t vfd_config;
|
||||||
hid_t split_fapl_id = H5I_INVALID_HID;
|
hid_t split_fapl_id = H5I_INVALID_HID;
|
||||||
herr_t ret;
|
herr_t ret = SUCCEED;
|
||||||
int ret_value = 0;
|
int ret_value = 0;
|
||||||
|
|
||||||
split_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
|
split_fapl_id = H5Pcreate(H5P_FILE_ACCESS);
|
||||||
@ -2503,6 +2503,7 @@ driver_is_splitter_compatible(hid_t fapl_id)
|
|||||||
vfd_config.rw_fapl_id = H5P_DEFAULT;
|
vfd_config.rw_fapl_id = H5P_DEFAULT;
|
||||||
vfd_config.wo_fapl_id = fapl_id;
|
vfd_config.wo_fapl_id = fapl_id;
|
||||||
HDstrncpy(vfd_config.wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
|
HDstrncpy(vfd_config.wo_path, "nonesuch", H5FD_SPLITTER_PATH_MAX);
|
||||||
|
*vfd_config.log_file_path = '\0';
|
||||||
|
|
||||||
H5E_BEGIN_TRY {
|
H5E_BEGIN_TRY {
|
||||||
ret = H5Pset_fapl_splitter(split_fapl_id, &vfd_config);
|
ret = H5Pset_fapl_splitter(split_fapl_id, &vfd_config);
|
||||||
|
Loading…
Reference in New Issue
Block a user