Fix use after free. CID 10567.

This commit is contained in:
Michael Lotz
2011-12-12 01:58:50 +01:00
parent cfb5f18de4
commit a15a38c104
+3 -2
View File
@@ -1291,11 +1291,12 @@ TRACE(("haiku_child_wait_internal(): B_DEBUGGER_MESSAGE_HANDED_OVER: causing "
thread->reprocess_event
= (reprocessEvent >= 0 ? reprocessEvent : 0);
} else {
thread_id originThread = event->data.origin.thread;
xfree(event);
// continue the thread
if (event->data.origin.thread >= 0) {
haiku_continue_thread(teamDebugInfo, event->data.origin.thread,
if (originThread >= 0) {
haiku_continue_thread(teamDebugInfo, originThread,
B_THREAD_DEBUG_HANDLE_EVENT, false);
}