]> git.proxmox.com Git - mirror_qemu.git/commitdiff
net/colo-compare: Fix memory free error
authorZhang Chen <zhangchen.fnst@cn.fujitsu.com>
Wed, 22 Feb 2017 05:16:06 +0000 (13:16 +0800)
committerJason Wang <jasowang@redhat.com>
Mon, 6 Mar 2017 03:46:02 +0000 (11:46 +0800)
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>
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/colo-compare.c

index a6fc2ff48bb5c3acca93c4da18ca9fc6a3843643..300f017b59f844c7b132d2854d512f9c7aeca379 100644 (file)
@@ -729,7 +729,7 @@ static void colo_compare_finalize(Object *obj)
     /* Release all unhandled packets after compare thead exited */
     g_queue_foreach(&s->conn_list, colo_flush_packets, s);
 
-    g_queue_free(&s->conn_list);
+    g_queue_clear(&s->conn_list);
 
     g_hash_table_destroy(s->connection_track_table);
     g_free(s->pri_indev);