From: Marc-André Lureau Date: Wed, 6 Jul 2016 16:42:46 +0000 (+0200) Subject: qemu-sockets: use qapi_free_SocketAddress in cleanup X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~6^2~13^2~6^2~114^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73f40c1895980dc705b6b0594ace6580b3f68537;p=sdk%2Femulator%2Fqemu.git qemu-sockets: use qapi_free_SocketAddress in cleanup 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 --- diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index fb83d48944..777af49d53 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)