mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
connect: Don't leak the addressinfo on error.
This commit is contained in:
@@ -247,6 +247,7 @@ socket_t ssh_connect_host(ssh_session session, const char *host,
|
|||||||
"Failed to resolve bind address %s (%s)",
|
"Failed to resolve bind address %s (%s)",
|
||||||
bind_addr,
|
bind_addr,
|
||||||
gai_strerror(rc));
|
gai_strerror(rc));
|
||||||
|
freeaddrinfo(ai);
|
||||||
close(s);
|
close(s);
|
||||||
leave_function();
|
leave_function();
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user