diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2018-12-15 01:31:41 (GMT) |
---|---|---|
committer | Jordan Henderson <jhenderson@hdfgroup.org> | 2018-12-15 01:31:41 (GMT) |
commit | bc0a08d997b1096e0fc51d6d5d52febc655f069d (patch) | |
tree | 1b88b7c3fb5b8f83a97834b34014f1a3f3d3f353 /src | |
parent | 7670f112caea0748574b6b1b9752543a168f2538 (diff) | |
parent | 74d167d738f719fc1076ed16360e9fd5b7ba4c98 (diff) | |
download | hdf5-bc0a08d997b1096e0fc51d6d5d52febc655f069d.zip hdf5-bc0a08d997b1096e0fc51d6d5d52febc655f069d.tar.gz hdf5-bc0a08d997b1096e0fc51d6d5d52febc655f069d.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/H5VLint.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5VLint.c b/src/H5VLint.c index 82886cd..147e996 100644 --- a/src/H5VLint.c +++ b/src/H5VLint.c @@ -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() */ |