diff options
author | Zhang Chen <zhangchen.fnst@cn.fujitsu.com> | 2017-02-22 13:16:06 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2017-03-06 11:46:02 +0800 |
commit | 727c2d764fef0c9492a2e220ba8a6d0979836d36 (patch) | |
tree | d5d6dc6c8177ba4498b8ca4e4ebbf21e8259f149 /net/colo-compare.c | |
parent | b43decb015a6efeb9e3cdbdb80f6547ad7248a4c (diff) | |
download | qemu-727c2d764fef0c9492a2e220ba8a6d0979836d36.zip qemu-727c2d764fef0c9492a2e220ba8a6d0979836d36.tar.gz qemu-727c2d764fef0c9492a2e220ba8a6d0979836d36.tar.bz2 |
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 <zhangchen.fnst@cn.fujitsu.com>
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/colo-compare.c')
-rw-r--r-- | net/colo-compare.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/colo-compare.c b/net/colo-compare.c index a6fc2ff..300f017 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); |