summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPan Nengyuan2020-08-31 15:43:15 +0200
committerGerd Hoffmann2020-09-04 07:30:57 +0200
commit7791acaf3d1852cea4b0e82d07c6577faec6e900 (patch)
treeba15d275bba58a1f573faa71b7908e721bdad80f
parentui/gtk-gl-area: Plug memleak in gd_gl_area_create_context() (diff)
downloadqemu-7791acaf3d1852cea4b0e82d07c6577faec6e900.tar.gz
qemu-7791acaf3d1852cea4b0e82d07c6577faec6e900.tar.xz
qemu-7791acaf3d1852cea4b0e82d07c6577faec6e900.zip
vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string
'addr' is forgot to free in vnc_socket_ip_addr_string error path. Fix that. Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Message-Id: <20200831134315.1221-11-pannengyuan@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--ui/vnc-auth-sasl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c
index 7b2b09f242..0517b2ead9 100644
--- a/ui/vnc-auth-sasl.c
+++ b/ui/vnc-auth-sasl.c
@@ -522,6 +522,7 @@ vnc_socket_ip_addr_string(QIOChannelSocket *ioc,
if (addr->type != SOCKET_ADDRESS_TYPE_INET) {
error_setg(errp, "Not an inet socket type");
+ qapi_free_SocketAddress(addr);
return NULL;
}
ret = g_strdup_printf("%s;%s", addr->u.inet.host, addr->u.inet.port);