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>
This commit is contained in:
parent
2cd1e3f915
commit
7791acaf3d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user