Skip to content

Commit

Permalink
roaring64: Don't crash on roaring64_bitmap_free(NULL) (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
madscientist authored Jun 4, 2024
1 parent 7f072eb commit 857c320
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/roaring64.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ roaring64_bitmap_t *roaring64_bitmap_create(void) {
}

void roaring64_bitmap_free(roaring64_bitmap_t *r) {
if (!r) {
return;
}
art_iterator_t it = art_init_iterator(&r->art, /*first=*/true);
while (it.value != NULL) {
leaf_t *leaf = (leaf_t *)it.value;
Expand Down

0 comments on commit 857c320

Please sign in to comment.