-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix double free error #79
Conversation
See if |
I experimented with the fbdev and SDL backends and confirmed that it can run normally without |
Refine the proposed changes by revisiting the use of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refine the git commit messages: Drop the 'fbdev' backend in the subject and mention the observation in 'fbdev' backend in the body instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Append Close #75
at the end of git commit messages.
Removed the free(old) call from the _twin_queue_delete function, consolidating memory deallocation into the _twin_queue_review_order function. This change improves memory management and enhances the maintainability of the code. The fix was verified on the fbdev backend using GDB to confirm that old is properly freed during the execution of free(q) in the _twin_queue_review_order function. Additionally, on the same backend, AddressSanitizer was used to confirm the absence of memory leaks and double free issues. Close sysprog21#75
c16c69c
to
232542c
Compare
Thank @huaxinliao for contributing! |
Removed the
free(old)
call from the_twin_queue_delete
function, consolidating memory deallocation into the_twin_queue_review_order
function. This change improves memory management and enhances the maintainability of the code.The fix was verified using GDB to confirm that old is properly freed during the execution of
free(q)
in the_twin_queue_review_order
function. Additionally, AddressSanitizer was used to confirm the absence of memory leaks and double free issues.