Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly deallocate memory in destroy_geom_box_tree #58

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

ahoenselaar
Copy link
Contributor

If nobjects is zero, then MALLOC is still called during the construction of the tree. However, malloc implementations can choose to return a non-NULL pointer in that case and the returned pointer should be freed in order to prevent leaks: https://en.cppreference.com/w/c/memory/malloc

If `nobjects` is zero, then MALLOC is still called during the construction of the tree. However, `malloc` implementations can choose to return a non-NULL pointer in that case and the returned pointer should be freed in order to prevent leaks: https://en.cppreference.com/w/c/memory/malloc
@stevengj stevengj merged commit 21aff7e into NanoComp:master Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants