From: Zhang Chen Date: Fri, 1 Apr 2022 03:47:01 +0000 (+0800) Subject: net/colo.c: No need to track conn_list for filter-rewriter X-Git-Tag: qemu-xen-4.18.0-rc5~604^2~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=94c36c48751bf5ff644e6c8e17a21003edacfc5d;p=qemu-xen.git net/colo.c: No need to track conn_list for filter-rewriter Filter-rewriter no need to track connection in conn_list. This patch fix the glib g_queue_is_empty assertion when COLO guest keep a lot of network connection. Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian Signed-off-by: Jason Wang --- diff --git a/net/colo.c b/net/colo.c index 1f8162f59f..694f3c93ef 100644 --- a/net/colo.c +++ b/net/colo.c @@ -218,7 +218,7 @@ Connection *connection_get(GHashTable *connection_track_table, /* * clear the conn_list */ - while (!g_queue_is_empty(conn_list)) { + while (conn_list && !g_queue_is_empty(conn_list)) { connection_destroy(g_queue_pop_head(conn_list)); } }