phyp_driver: Resolve Coverity RESOURCE_LEAK

Coverity determines that when jumping to the connected: label, the
addressinfo (ai) is not free'd.
This commit is contained in:
John Ferlan 2014-08-27 15:31:38 -04:00
parent ad4966d91a
commit bc9929958d

View File

@ -946,6 +946,7 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
sock = socket(cur->ai_family, cur->ai_socktype, cur->ai_protocol);
if (sock >= 0) {
if (connect(sock, cur->ai_addr, cur->ai_addrlen) == 0) {
freeaddrinfo(ai);
goto connected;
}
VIR_FORCE_CLOSE(sock);