aboutsummaryrefslogtreecommitdiff
path: root/lib/easy.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/easy.c')
-rw-r--r--lib/easy.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 5917db36a..72506488a 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -253,6 +253,13 @@ static CURLcode global_init(long flags, bool memoryfuncs)
}
#endif
+#if defined(USE_LIBSSH)
+ if(ssh_init()) {
+ DEBUGF(fprintf(stderr, "Error: libssh_init failed\n"));
+ return CURLE_FAILED_INIT;
+ }
+#endif
+
if(flags & CURL_GLOBAL_ACK_EINTR)
Curl_ack_eintr = 1;
@@ -330,6 +337,10 @@ void curl_global_cleanup(void)
(void)libssh2_exit();
#endif
+#if defined(USE_LIBSSH)
+ (void)ssh_finalize();
+#endif
+
init_flags = 0;
}