[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 2/4] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string

From: Gerd Hoffmann
Subject: [PULL 2/4] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string
Date: Fri, 4 Sep 2020 09:01:10 +0200

From: Pan Nengyuan <pannengyuan@huawei.com>

'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>
 ui/vnc-auth-sasl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c
index 7b2b09f24276..0517b2ead9ce 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);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]