1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

connect: Don't leak the file descriptor on error.

Found by Coverity.
This commit is contained in:
Andreas Schneider
2012-10-08 21:19:34 +02:00
parent 802e4133cb
commit ba220adb84

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));
close(s);
leave_function(); leave_function();
return -1; return -1;
} }