From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgRyO-0005Lx-SH for qemu-devel@nongnu.org; Wed, 22 Feb 2017 03:08:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgRyN-0000S9-Tw for qemu-devel@nongnu.org; Wed, 22 Feb 2017 03:08:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32768) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgRyN-0000S5-OP for qemu-devel@nongnu.org; Wed, 22 Feb 2017 03:08:27 -0500 References: <1487740566-15302-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> From: Jason Wang Message-ID: Date: Wed, 22 Feb 2017 16:08:22 +0800 MIME-Version: 1.0 In-Reply-To: <1487740566-15302-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2] net/colo-compare: Fix memory free error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhang Chen , qemu devel On 2017=E5=B9=B402=E6=9C=8822=E6=97=A5 13:16, Zhang Chen wrote: > We use g_queue_init() to init s->conn_list, so we should use g_queue_cl= ear() > to instead of g_queue_free(). > > Signed-off-by: Zhang Chen > Reviewed-by: zhanghailiang > --- > net/colo-compare.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. > > 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); > =20 > - g_queue_free(&s->conn_list); > + g_queue_clear(&s->conn_list); > =20 > g_hash_table_destroy(s->connection_track_table); > g_free(s->pri_indev);