Commit 232542c
committed
Fix double free error
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 #751 parent 2cc4b56 commit 232542c
2 files changed
+0
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
457 | 456 | | |
458 | 457 | | |
459 | 458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
58 | | - | |
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
| |||
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | | - | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
| |||
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
79 | | - | |
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
| |||
0 commit comments