From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erRLB-0006A1-V5 for qemu-devel@nongnu.org; Thu, 01 Mar 2018 11:45:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erRL8-0000iO-KN for qemu-devel@nongnu.org; Thu, 01 Mar 2018 11:45:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52414 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erRL8-0000hn-FC for qemu-devel@nongnu.org; Thu, 01 Mar 2018 11:45:54 -0500 Date: Thu, 1 Mar 2018 18:45:53 +0200 From: "Michael S. Tsirkin" Message-ID: <1519922735-29054-2-git-send-email-mst@redhat.com> References: <1519922735-29054-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1519922735-29054-1-git-send-email-mst@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 01/13] vhost-user: fix memory leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , linzhecheng , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Jason Wang From: linzhecheng g_free() was moved from vhost_net_cleanup in commit e6bcb1b, so we should free net after vhost_net_cleanup Signed-off-by: linzhecheng Reviewed-by: Marc-Andr=C3=A9 Lureau < marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- net/vhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index cb45512..d024573 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -109,6 +109,7 @@ static int vhost_user_start(int queues, NetClientStat= e *ncs[], CharBackend *be) err: if (net) { vhost_net_cleanup(net); + g_free(net); } vhost_user_stop(i, ncs); return -1; --=20 MST