From: Zhang Chen Date: Wed, 22 Feb 2017 05:16:06 +0000 (+0800) Subject: net/colo-compare: Fix memory free error X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=727c2d764fef0c9492a2e220ba8a6d0979836d36;p=qemu.git net/colo-compare: Fix memory free error 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 Reviewed-by: zhanghailiang Signed-off-by: Jason Wang --- diff --git a/net/colo-compare.c b/net/colo-compare.c index a6fc2ff48b..300f017b59 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -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);