aboutsummaryrefslogtreecommitdiff
path: root/libssh/keys.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-17 18:22:53 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-17 18:22:53 +0000
commita925c266ca624863f343d46bc4e14efaa1d761f1 (patch)
tree20ef68b08aaf30d040291b36549b4b728dc173d9 /libssh/keys.c
parentc48d04b2c7e1299242a6320574175e44f5cdd007 (diff)
downloadlibssh-a925c266ca624863f343d46bc4e14efaa1d761f1.tar.gz
libssh-a925c266ca624863f343d46bc4e14efaa1d761f1.tar.xz
libssh-a925c266ca624863f343d46bc4e14efaa1d761f1.zip
Revert commit 527.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@529 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/keys.c')
-rw-r--r--libssh/keys.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libssh/keys.c b/libssh/keys.c
index c4b47f4d..04ddcd09 100644
--- a/libssh/keys.c
+++ b/libssh/keys.c
@@ -248,7 +248,6 @@ void publickey_free(PUBLIC_KEY *key) {
}
PUBLIC_KEY *publickey_from_string(SSH_SESSION *session, STRING *pubkey_s) {
- PUBLIC_KEY *key = NULL;
BUFFER *tmpbuf = NULL;
STRING *type_s = NULL;
char *type = NULL;
@@ -277,21 +276,15 @@ PUBLIC_KEY *publickey_from_string(SSH_SESSION *session, STRING *pubkey_s) {
if(strcmp(type, "ssh-dss") == 0) {
SAFE_FREE(type);
- key = publickey_make_dss(session, tmpbuf);
- buffer_free(tmpbuf);
- return key;
+ return publickey_make_dss(session, tmpbuf);
}
if(strcmp(type,"ssh-rsa") == 0) {
SAFE_FREE(type);
- key = publickey_make_rsa(session, tmpbuf,"ssh-rsa");
- buffer_free(tmpbuf);
- return key;
+ return publickey_make_rsa(session, tmpbuf,"ssh-rsa");
}
if (strcmp(type,"ssh-rsa1") == 0) {
SAFE_FREE(type);
- key = publickey_make_rsa(session, tmpbuf,"ssh-rsa1");
- buffer_free(tmpbuf);
- return key;
+ return publickey_make_rsa(session, tmpbuf,"ssh-rsa1");
}
ssh_set_error(session, SSH_FATAL, "Unknown public key protocol %s", type);