[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/13] main-loop: Fix GSource leak in qio_task_thread
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 12/13] main-loop: Fix GSource leak in qio_task_thread_worker() |
Date: |
Wed, 21 Aug 2019 19:28:20 +0200 |
From: Alberto Garcia <address@hidden>
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 a17536c594bfed94d05667b419f747b692f5fc7f.
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
io/task.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/io/task.c b/io/task.c
index 64c4c71..1ae7b86 100644
--- a/io/task.c
+++ b/io/task.c
@@ -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);
--
1.8.3.1
- [Qemu-devel] [PULL 02/13] configure: define CONFIG_TOOLS here, (continued)
- [Qemu-devel] [PULL 02/13] configure: define CONFIG_TOOLS here, Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 03/13] module: use g_hash_table_add(), Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 04/13] module: return success on module load, Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 05/13] tests: add module loading test, Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 06/13] configure: remove AUTOCONF_HOST, Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 07/13] minikconf: don't print CONFIG_FOO=n lines, Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 08/13] memory: Refactor memory_region_clear_coalescing, Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 09/13] memory: Split zones when do coalesced_io_del(), Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 10/13] memory: Remove has_coalesced_range counter, Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 11/13] memory: Fix up memory_region_{add|del}_coalescing, Paolo Bonzini, 2019/08/21
- [Qemu-devel] [PULL 12/13] main-loop: Fix GSource leak in qio_task_thread_worker(),
Paolo Bonzini <=
- [Qemu-devel] [PULL 13/13] char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout(), Paolo Bonzini, 2019/08/21
- Re: [Qemu-devel] [PULL 00/13] Misc patches for 2019-08-21, Peter Maydell, 2019/08/22
- Re: [Qemu-devel] [PULL 00/13] Misc patches for 2019-08-21, Peter Maydell, 2019/08/22