Skip to content

Commit

Permalink
completing the null removal
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jul 27, 2024
1 parent 1322561 commit 0531c85
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/containers/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ int array_container_shrink_to_fit(array_container_t *src) {
/* Free memory. */
void array_container_free(array_container_t *arr) {
roaring_free(arr->array);
arr->array = NULL; // pedantic
roaring_free(arr);
}

Expand Down
6 changes: 1 addition & 5 deletions src/containers/bitset.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,7 @@ void bitset_container_add_from_range(bitset_container_t *bitset, uint32_t min,

/* Free memory. */
void bitset_container_free(bitset_container_t *bitset) {
if (bitset->words !=
NULL) { // Jon Strabala reports that some tools complain otherwise
roaring_aligned_free(bitset->words);
bitset->words = NULL; // pedantic
}
roaring_aligned_free(bitset->words);
roaring_free(bitset);
}

Expand Down
1 change: 0 additions & 1 deletion src/containers/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ void run_container_offset(const run_container_t *c, container_t **loc,
/* Free memory. */
void run_container_free(run_container_t *run) {
roaring_free(run->runs);
run->runs = NULL; // pedantic
roaring_free(run);
}

Expand Down

0 comments on commit 0531c85

Please sign in to comment.