Skip to content

Commit e6c7014

Browse files
committed
fix umfDisjointPoolParamsDestroy
1 parent 97161cf commit e6c7014

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pool/pool_disjoint.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,8 @@ umfDisjointPoolParamsCreate(umf_disjoint_pool_params_handle_t *hParams) {
10981098

10991099
umf_result_t
11001100
umfDisjointPoolParamsDestroy(umf_disjoint_pool_params_handle_t hParams) {
1101-
if (hParams) {
1101+
// NOTE: dereferencing hParams when BA is already destroyed leads to crash
1102+
if (hParams && !umf_ba_global_is_destroyed()) {
11021103
umf_ba_global_free(hParams->name);
11031104
umf_ba_global_free(hParams);
11041105
}

0 commit comments

Comments
 (0)