summaryrefslogtreecommitdiffstats
path: root/libssh/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/client.c')
-rw-r--r--libssh/client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libssh/client.c b/libssh/client.c
index 15e67da9..cfcaf96c 100644
--- a/libssh/client.c
+++ b/libssh/client.c
@@ -453,7 +453,10 @@ int ssh_connect(SSH_SESSION *session) {
leave_function();
return SSH_ERROR;
}
- ssh_socket_init();
+ if (ssh_socket_init() < 0) {
+ leave_function();
+ return SSH_ERROR;
+ }
if (options->fd == -1 && options->host == NULL) {
ssh_set_error(session, SSH_FATAL, "Hostname required");