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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user