mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 17:46:09 +00:00
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.
This commit is contained in:
parent
9cc0ba6bab
commit
8c027351cb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user