Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

error in free_counting_bloom. #72

Open
wsm234 opened this issue May 11, 2017 · 0 comments
Open

error in free_counting_bloom. #72

wsm234 opened this issue May 11, 2017 · 0 comments

Comments

@wsm234
Copy link

wsm234 commented May 11, 2017

There is a serious error in free_counting_bloom, and memory leak will happen.
Please modify the code as follows:
don't free bloom->bitmap directly.
call free_bitmap( bloom->bitmap ) instead.

//
int free_counting_bloom(counting_bloom_t *bloom)
{
if (bloom != NULL) {
free(bloom->hashes);
bloom->hashes = NULL;
//
//free(bloom->bitmap);
free_bitmap( bloom->bitmap );
//
free(bloom);
bloom = NULL;
}
return 0;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant