summaryrefslogtreecommitdiff
path: root/src/transports/ssh.c
diff options
context:
space:
mode:
authorBrad Morgan <brad@dmgctrl.com>2013-05-15 12:38:40 -0400
committerBrad Morgan <brad@dmgctrl.com>2013-05-15 12:38:40 -0400
commit22011b33daf1a722ae1f522b32e188dccb21ac42 (patch)
treea9836caa878596e05380223b14fecee2a50d7da2 /src/transports/ssh.c
parent89ea0e51814bc3161fd8fc62045cdabbedf41a2c (diff)
downloadlibgit2-22011b33daf1a722ae1f522b32e188dccb21ac42.tar.gz
Cleanup
Diffstat (limited to 'src/transports/ssh.c')
-rw-r--r--src/transports/ssh.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index f11b5fb67..f04adf582 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -375,12 +375,8 @@ static int _git_ssh_setup_conn(
t->current_stream = s;
git__free(host);
git__free(port);
- if (user) {
- git__free(user);
- }
- if (pass) {
- git__free(pass);
- }
+ git__free(user);
+ git__free(pass);
return 0;
@@ -389,12 +385,10 @@ on_error:
ssh_stream_free(*stream);
git__free(host);
- if (port)
- git__free(port);
- if (user)
- git__free(user);
- if (pass)
- git__free(pass);
+ git__free(port);
+ git__free(user);
+ git__free(pass);
+
if (session)
libssh2_session_free(session), session = NULL;