aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-10-09 11:27:24 +0200
committerAndreas Schneider <asn@cryptomilk.org>2012-10-12 08:07:02 +0200
commitecb6cfd053df7ca88f77e063a45fb2a7f83ce86f (patch)
treef82d0dd1a7f81b81083a9928636dba8692c621a9
parentba220adb841829711452c95b4d70f1a4c93e8dfe (diff)
downloadlibssh-ecb6cfd053df7ca88f77e063a45fb2a7f83ce86f.tar.gz
libssh-ecb6cfd053df7ca88f77e063a45fb2a7f83ce86f.tar.xz
libssh-ecb6cfd053df7ca88f77e063a45fb2a7f83ce86f.zip
connect: Don't leak the addressinfo on error.
-rw-r--r--src/connect.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/connect.c b/src/connect.c
index 35453c73..ae55b140 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -247,6 +247,7 @@ socket_t ssh_connect_host(ssh_session session, const char *host,
"Failed to resolve bind address %s (%s)",
bind_addr,
gai_strerror(rc));
+ freeaddrinfo(ai);
close(s);
leave_function();
return -1;