diff --git a/qemu/util/qemu-thread-win32.c b/qemu/util/qemu-thread-win32.c index 3a85e6a4..26fe5cd8 100644 --- a/qemu/util/qemu-thread-win32.c +++ b/qemu/util/qemu-thread-win32.c @@ -49,11 +49,13 @@ static unsigned __stdcall win32_start_routine(void *arg) void *(*start_routine)(void *) = data->start_routine; void *thread_arg = data->arg; +#if 0 if (data->mode == QEMU_THREAD_DETACHED) { data->uc->qemu_thread_data = NULL; g_free(data); - data = NULL; } +#endif + qemu_thread_exit(data->uc, start_routine(thread_arg)); abort(); } @@ -99,7 +101,7 @@ void *qemu_thread_join(QemuThread *thread) DeleteCriticalSection(&data->cs); data->uc->qemu_thread_data = NULL; g_free(data); - data = NULL; + return ret; }