diff options
author | Brad Morgan <brad@dmgctrl.com> | 2013-05-15 12:41:16 -0400 |
---|---|---|
committer | Brad Morgan <brad@dmgctrl.com> | 2013-05-15 12:41:16 -0400 |
commit | b54ed3efe88801df17ba7ceff40887dfabed0338 (patch) | |
tree | 6901cad06b348e77c843d328623e6886b2e43ef2 /src/transports/ssh.c | |
parent | 22011b33daf1a722ae1f522b32e188dccb21ac42 (diff) | |
download | libgit2-b54ed3efe88801df17ba7ceff40887dfabed0338.tar.gz |
Added error check
Diffstat (limited to 'src/transports/ssh.c')
-rw-r--r-- | src/transports/ssh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c index f04adf582..b88b84817 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c @@ -342,7 +342,8 @@ static int _git_ssh_setup_conn( goto on_error; if (user && pass) { - git_cred_userpass_plaintext_new(&t->cred, user, pass); + if (git_cred_userpass_plaintext_new(&t->cred, user, pass) < 0) + goto on_error; } else { if (t->owner->cred_acquire_cb(&t->cred, t->owner->url, |