mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-01 16:28:09 +08:00
Merge pull request #1379 in HDFFV/hdf5 from ~JHENDERSON/hdf5:develop to develop
* commit '74d167d738f719fc1076ed16360e9fd5b7ba4c98': Make sure to free copy of VOL connector's name when H5VL_register_connector fails
This commit is contained in:
commit
bc0a08d997
@ -625,9 +625,12 @@ H5VL_register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID")
|
||||
|
||||
done:
|
||||
if (ret_value < 0)
|
||||
if (saved)
|
||||
H5FL_FREE(H5VL_class_t, saved);
|
||||
if (ret_value < 0 && saved) {
|
||||
if (saved->name)
|
||||
H5MM_xfree(saved->name);
|
||||
|
||||
H5FL_FREE(H5VL_class_t, saved);
|
||||
}
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5VL_register_connector() */
|
||||
|
Loading…
Reference in New Issue
Block a user