-
Notifications
You must be signed in to change notification settings - Fork 797
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
unsafe free-ing of memory #764
Comments
BUT, and I agree with the suggestion here, after *I.e. every sane libc implementation has. If it does not, don't use that libc variant … |
@BenBE |
There's nothing wrong with the additional check. It's just not necessary. |
I created #790 to address the issue. Closing this to keep things clean. |
All calls to lfs_free() suffer from 2 issues:
Reproducible by 2 consecutive calls to lfs_unmount() causing an attempt to free the cache pointers twice. I don't know about other heap implementations, but mine cannot guard against double free attempts and corrupts the heap in an instant.
Here's my solution for lfs_deinit() that covers 3 of the 4 calls to lfs_free. I did the same in lfs_file_rawclose() which is the only other place that lfs_free is called.
The text was updated successfully, but these errors were encountered: