Commit b54ed3efe88801df17ba7ceff40887dfabed0338

Brad Morgan 2013-05-15T12:41:16

Added error check

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index f04adf5..b88b848 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,