Commit 06a8717
committed
Fix the heap-use-after-free and memory leak
To fix the heap-use-after-free issue when 'screen' is accessed by the
'twin_sdl_work()' function, remove the '_twin_sdl_destroy(screen, tx)'
operation. Additionally, to address the memory leak, add the
'twin_path_destroy(path)' function to ensure the unused path is properly
destroyed. Add the operation to deallocate 'frame', as it will no longer
be used in the future.
Close #491 parent 9530bc5 commit 06a8717
3 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| 603 | + | |
603 | 604 | | |
604 | 605 | | |
605 | 606 | | |
606 | 607 | | |
| 608 | + | |
607 | 609 | | |
608 | 610 | | |
609 | 611 | | |
| |||
0 commit comments