diff options
Diffstat (limited to 'src/H5VLint.c')
-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() */ |