diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-04-30 14:53:42 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-04-30 14:53:42 +0000 |
commit | 5b1c21593cbea0c4dc2ec4437d25c06f4d125787 (patch) | |
tree | 327356aa9486b41b1177a144d43ce30447d300cf /libssh | |
parent | 2ed97906e3942ae4271a950a7a3c17839ebf7438 (diff) | |
download | libssh-5b1c21593cbea0c4dc2ec4437d25c06f4d125787.tar.gz libssh-5b1c21593cbea0c4dc2ec4437d25c06f4d125787.tar.xz libssh-5b1c21593cbea0c4dc2ec4437d25c06f4d125787.zip |
Initialize the vars with NULL to prevent a segfault on error.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@669 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/auth.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libssh/auth.c b/libssh/auth.c index 29f6648..e9b2d55 100644 --- a/libssh/auth.c +++ b/libssh/auth.c @@ -199,8 +199,8 @@ int ssh_userauth_list(SSH_SESSION *session, const char *username) { */ int ssh_userauth_none(SSH_SESSION *session, const char *username) { STRING *user = NULL; - STRING *service; - STRING *method; + STRING *service = NULL; + STRING *method = NULL; int rc = SSH_AUTH_ERROR; enter_function(); @@ -303,10 +303,10 @@ error: */ int ssh_userauth_offer_pubkey(SSH_SESSION *session, const char *username, int type, STRING *publickey) { - STRING *user; - STRING *service; - STRING *method; - STRING *algo; + STRING *user = NULL; + STRING *service = NULL; + STRING *method = NULL; + STRING *algo = NULL; int rc = SSH_AUTH_ERROR; enter_function(); @@ -416,11 +416,11 @@ error: */ int ssh_userauth_pubkey(SSH_SESSION *session, const char *username, STRING *publickey, PRIVATE_KEY *privatekey) { - STRING *user; - STRING *service; - STRING *method; - STRING *algo; - STRING *sign; + STRING *user = NULL; + STRING *service = NULL; + STRING *method = NULL; + STRING *algo = NULL; + STRING *sign = NULL; int rc = SSH_AUTH_ERROR; enter_function(); |