Debugger: Fix use-after-free in breakpoint clearing code (again)

This commit is contained in:
Jeffrey Pfau 2015-08-15 22:12:26 -07:00
parent 7a6582503f
commit 3a9ac188d4
2 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,7 @@ Bugfixes:
- GBA Video: Fix timing on first scanline
- GBA: Ensure cycles never go negative
- Util: Fix formatting of floats
- Debugger: Fix use-after-free in breakpoint clearing code
Misc:
- Qt: Handle saving input settings better
- Debugger: Free watchpoints in addition to breakpoints

View File

@ -155,6 +155,7 @@ void ARMDebuggerClearBreakpoint(struct ARMDebugger* debugger, uint32_t address)
if (breakpoint->address == address) {
*previous = *next;
free(breakpoint);
continue;
}
previous = next;
}
@ -179,6 +180,7 @@ void ARMDebuggerClearWatchpoint(struct ARMDebugger* debugger, uint32_t address)
if (watchpoint->address == address) {
*previous = *next;
free(watchpoint);
continue;
}
previous = next;
}