diff options
-rw-r--r-- | iothread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/iothread.c b/iothread.c index fb08a60b4b..fbeb8deb38 100644 --- a/iothread.c +++ b/iothread.c @@ -75,6 +75,9 @@ static void iothread_instance_finalize(Object *obj) iothread_stop(obj, NULL); qemu_cond_destroy(&iothread->init_done_cond); qemu_mutex_destroy(&iothread->init_done_lock); + if (!iothread->ctx) { + return; + } aio_context_unref(iothread->ctx); } |