diff --git a/qemu/util/qemu-thread-win32.c b/qemu/util/qemu-thread-win32.c index 2035ddac..3a85e6a4 100644 --- a/qemu/util/qemu-thread-win32.c +++ b/qemu/util/qemu-thread-win32.c @@ -97,7 +97,9 @@ void *qemu_thread_join(QemuThread *thread) ret = data->ret; assert(data->mode != QEMU_THREAD_DETACHED); DeleteCriticalSection(&data->cs); + data->uc->qemu_thread_data = NULL; g_free(data); + data = NULL; return ret; } diff --git a/uc.c b/uc.c index 19aedaee..348e47c1 100644 --- a/uc.c +++ b/uc.c @@ -310,7 +310,7 @@ uc_err uc_close(uc_engine *uc) // Thread relateds. if (uc->qemu_thread_data) - free(uc->qemu_thread_data); + g_free(uc->qemu_thread_data); // Other auxilaries. free(uc->l1_map);