Commit 8c027351 by Patrick Steinhardt

transports: ssh: report failure initializing libssh2

We unconditionally return success when initializing libssh2, regardless
of whether `libgssh2_init` signals success or an error. Fix this by
checking its return code.
parent 9cc0ba6b
......@@ -896,8 +896,11 @@ int git_transport_ssh_with_paths(git_transport **out, git_remote *owner, void *p
int git_transport_ssh_global_init(void)
{
#ifdef GIT_SSH
if (libssh2_init(0) < 0) {
giterr_set(GITERR_SSH, "unable to initialize libssh2");
return -1;
}
libssh2_init(0);
return 0;
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment