1
0
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:
Andreas Schneider
2012-10-09 11:27:24 +02:00
parent ba220adb84
commit ecb6cfd053

View File

@@ -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;