All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error
@ 2017-02-21  2:44 Zhang Chen
  2017-02-22  1:47 ` Hailiang Zhang
  0 siblings, 1 reply; 5+ messages in thread
From: Zhang Chen @ 2017-02-21  2:44 UTC (permalink / raw)
  To: qemu devel; +Cc: Jason Wang, Zhang Chen

We use g_queue_init() to init s->conn_list, so we should use g_queue_clear()
to instead of g_queue_free().

Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
---
 net/colo-compare.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/colo-compare.c b/net/colo-compare.c
index 162fd6a..cf8c4c9 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -715,7 +715,7 @@ static void colo_compare_finalize(Object *obj)
     qemu_chr_fe_deinit(&s->chr_sec_in);
     qemu_chr_fe_deinit(&s->chr_out);
 
-    g_queue_free(&s->conn_list);
+    g_queue_clear(&s->conn_list);
 
     if (qemu_thread_is_self(&s->thread)) {
         /* compare connection */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-22  5:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21  2:44 [Qemu-devel] [PATCH] net/colo-compare: Fix memory free error Zhang Chen
2017-02-22  1:47 ` Hailiang Zhang
2017-02-22  3:09   ` Jason Wang
2017-02-22  3:15     ` Jason Wang
2017-02-22  5:06       ` Zhang Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.