Skip to content

Commit 32421eb

Browse files
authored
Merge pull request #1543 from bratpiorka/rrudnick_fix_dp_free_chunk
fix Disjoint Pool bucket_free_chunk
2 parents 1088fad + 59f8f4a commit 32421eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pool/pool_disjoint.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,11 +837,11 @@ static void bucket_free_chunk(bucket_t *bucket, void *ptr, slab_t *slab,
837837
// remove slab
838838
slab_list_item_t *slab_it = &slab->iter;
839839
assert(slab_it->val != NULL);
840-
destroy_slab(slab_it->val);
840+
pool_unregister_slab(bucket->pool, slab_it->val);
841841
DL_DELETE(bucket->available_slabs, slab_it);
842842
assert(bucket->available_slabs_num > 0);
843843
bucket->available_slabs_num--;
844-
pool_unregister_slab(bucket->pool, slab_it->val);
844+
destroy_slab(slab_it->val);
845845
}
846846
} else {
847847
// return this chunk to the pool

0 commit comments

Comments
 (0)