]> git.proxmox.com Git - mirror_qemu.git/commit
colo-compare: kick compare thread to exit after some cleanup in finalization
authorzhanghailiang <zhang.zhanghailiang@huawei.com>
Fri, 17 Feb 2017 02:53:12 +0000 (10:53 +0800)
committerJason Wang <jasowang@redhat.com>
Mon, 6 Mar 2017 03:46:02 +0000 (11:46 +0800)
commitdfd917a9c2bed578c31043126c9f558190bf21e4
treeee4357ac9c60157d73723b6341ac3d9303c083f4
parent66d2a2423ef3f2a3b066d7e9e3301e4fd42f51b3
colo-compare: kick compare thread to exit after some cleanup in finalization

We should call g_main_loop_quit() to notify colo compare thread to
exit, Or it will run in g_main_loop_run() forever.

Besides, the finalizing process can't happen in context of colo thread,
it is reasonable to remove the 'if (qemu_thread_is_self(&s->thread))'
branch.

Before compare thead exits, some cleanup works need to be
done,  All unhandled packets need to be released and connection_track_table
needs to be freed, or there will be memory leak.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/colo-compare.c