gssmask: client_connect addrinfo leak
In client_connect() getaddrinfo() stores the head of the allocated addrinfo structure list in 'res0'. 'res' is used to walk the list and will be NULL at the end of the for() loop when freeaddrinfo(res) is executed. Pass 'res0' to freeaddrinfo() instead of 'res'. Change-Id: Ie1358c0356b6b0f98470e46e25216cfa0ab4adac
This commit is contained in:
@@ -646,7 +646,7 @@ connect_client(const char *slave)
|
||||
}
|
||||
if (sock == rk_INVALID_SOCKET)
|
||||
err(1, "connect to host: %s", name);
|
||||
freeaddrinfo(res);
|
||||
freeaddrinfo(res0);
|
||||
|
||||
c->sock = krb5_storage_from_socket(sock);
|
||||
rk_closesocket(sock);
|
||||
|
Reference in New Issue
Block a user