diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-08-01 16:18:18 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-08-01 16:18:18 (GMT) |
commit | 1ae6daaa807f2bfd63076215950d9c412bfa08d7 (patch) | |
tree | d60f5aa4158d275f953561b47089add1ea76ecd2 /src/H5VLcallback.c | |
parent | 0a64f3e8106a1ced78ae7c4a6744b3509d7ca0fc (diff) | |
download | hdf5-1ae6daaa807f2bfd63076215950d9c412bfa08d7.zip hdf5-1ae6daaa807f2bfd63076215950d9c412bfa08d7.tar.gz hdf5-1ae6daaa807f2bfd63076215950d9c412bfa08d7.tar.bz2 |
Sync with develop
Diffstat (limited to 'src/H5VLcallback.c')
-rw-r--r-- | src/H5VLcallback.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c index e4ebb95..5c54b5b 100644 --- a/src/H5VLcallback.c +++ b/src/H5VLcallback.c @@ -525,7 +525,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5VL_free_connector_info(hid_t connector_id, void *info) +H5VL_free_connector_info(hid_t connector_id, const void *info) { H5VL_class_t *cls; /* VOL connector's class struct */ herr_t ret_value = SUCCEED; /* Return value */ @@ -543,12 +543,13 @@ H5VL_free_connector_info(hid_t connector_id, void *info) if(info) { /* Allow the connector to free info or do it ourselves */ if(cls->info_cls.free) { - if((cls->info_cls.free)(info) < 0) + /* Cast through uintptr_t to de-const memory */ + if((cls->info_cls.free)((void *)(uintptr_t)info) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "connector info free request failed") - } /* end if */ + } else - H5MM_xfree(info); - } /* end if */ + H5MM_xfree_const(info); + } done: FUNC_LEAVE_NOAPI(ret_value) |