diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2019-06-18 03:09:45 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2019-06-18 03:09:45 (GMT) |
commit | 579793a7acebcb22d1adc2421a6c1b99618f3ee9 (patch) | |
tree | dbb9031819ec96a5c8d0e092d82d58b59ff588f7 /src/H5CX.c | |
parent | f73a190d2c2e2bfe80508599e0d76d62c358ae68 (diff) | |
download | hdf5-579793a7acebcb22d1adc2421a6c1b99618f3ee9.zip hdf5-579793a7acebcb22d1adc2421a6c1b99618f3ee9.tar.gz hdf5-579793a7acebcb22d1adc2421a6c1b99618f3ee9.tar.bz2 |
Fixed a warning in H5CX.c concerning incorrect use of freeing
VOL connector info.
Diffstat (limited to 'src/H5CX.c')
-rw-r--r-- | src/H5CX.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -982,18 +982,9 @@ H5CX_free_state(H5CX_state_t *api_state) /* Release the VOL connector property, if it was set */ if(api_state->vol_connector_prop.connector_id) { /* Clean up any VOL connector info */ - if(api_state->vol_connector_prop.connector_info) { - H5VL_class_t *connector; /* Pointer to connector */ - - /* Retrieve the connector for the ID */ - if(NULL == (connector = (H5VL_class_t *)H5I_object(api_state->vol_connector_prop.connector_id))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a VOL connector ID") - - /* Free the connector info */ - if(H5VL_free_connector_info(connector, api_state->vol_connector_prop.connector_info) < 0) + if(api_state->vol_connector_prop.connector_info) + if(H5VL_free_connector_info(api_state->vol_connector_prop.connector_id, api_state->vol_connector_prop.connector_info) < 0) HGOTO_ERROR(H5E_CONTEXT, H5E_CANTRELEASE, FAIL, "unable to release VOL connector info object") - } /* end if */ - /* Decrement connector ID */ if(H5I_dec_ref(api_state->vol_connector_prop.connector_id) < 0) HDONE_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't close VOL connector ID") |