summaryrefslogtreecommitdiffstats
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2010-03-25 15:30:23 +0100
committerAndreas Schneider <mail@cynapses.org>2010-03-25 15:32:28 +0100
commit5d339aa9e29e290661f683bac19de1b212607919 (patch)
treecd63ba231d00e28391653102135cdc192b61f682 /libssh
parentaf7f69c515b4b1385db24f78367498e5f080f1bb (diff)
Fixed a build warning in ssh_userauth_autopubkey.
Diffstat (limited to 'libssh')
-rw-r--r--libssh/auth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libssh/auth.c b/libssh/auth.c
index 399b02db..b67d57d8 100644
--- a/libssh/auth.c
+++ b/libssh/auth.c
@@ -860,12 +860,15 @@ int ssh_userauth_autopubkey(ssh_session session, const char *passphrase) {
} /* if agent is running */
#endif
+
for (it = ssh_list_get_iterator(session->identity);
it != NULL;
it = it->next) {
char *privkey_file = NULL;
int privkey_open = 0;
+ privkey = NULL;
+
privkey_file = dir_expand_dup(session, it->data, 1);
if (privkey_file == NULL) {
continue;