mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
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:
parent
ad4966d91a
commit
bc9929958d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user