Received: from eggs.gnu.org ([2001:4830:134:3::10]:52210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNKBb-0001uU-6K for qemu-devel@nongnu.org; Wed, 13 Jul 2016 09:26:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNKBW-0003BE-Bu for qemu-devel@nongnu.org; Wed, 13 Jul 2016 09:26:46 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:35889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNKBW-0003Aj-4x for qemu-devel@nongnu.org; Wed, 13 Jul 2016 09:26:42 -0400 Received: by mail-wm0-x241.google.com with SMTP id x83so5864907wma.3 for ; Wed, 13 Jul 2016 06:26:42 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 13 Jul 2016 15:26:25 +0200 Message-Id: <1468416392-120170-8-git-send-email-pbonzini@redhat.com> In-Reply-To: <1468416392-120170-1-git-send-email-pbonzini@redhat.com> References: <1468416392-120170-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 07/14] qemu-sockets: use qapi_free_SocketAddress in cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-André Lureau Commit 74b6ce43e3 uses the wrong free API for a SocketAddress, that may leak some linked data. Signed-off-by: Marc-André Lureau Message-Id: <20160706164246.22116-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- util/qemu-sockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index fb83d48..777af49 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -1012,7 +1012,7 @@ void socket_listen_cleanup(int fd, Error **errp) } } - g_free(addr); + qapi_free_SocketAddress(addr); } int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp) -- 1.8.3.1