mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
main-loop: Fix GSource leak in qio_task_thread_worker()
After g_source_attach() the GMainContext holds a reference to the
GSource, so the caller does not need to keep it.
qio_task_thread_worker() is not releasing its reference so the GSource
is being leaked since a17536c594
.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <1565625509-404969-2-git-send-email-andrey.shinkevich@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b960fc1796
commit
b65cb867cc
1 changed files with 1 additions and 0 deletions
|
@ -136,6 +136,7 @@ static gpointer qio_task_thread_worker(gpointer opaque)
|
|||
qio_task_thread_result, task, NULL);
|
||||
g_source_attach(task->thread->completion,
|
||||
task->thread->context);
|
||||
g_source_unref(task->thread->completion);
|
||||
trace_qio_task_thread_source_attach(task, task->thread->completion);
|
||||
|
||||
qemu_cond_signal(&task->thread_cond);
|
||||
|
|
Loading…
Reference in a new issue