aboutsummaryrefslogtreecommitdiff
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:30:23 +0100
commit51436cc3a344bdbef64d138b927bc8d5e0a116b2 (patch)
treecdc43d0aaa82576a4274c43bfd72abea55482f62
parentb168b8f03f420cacccc971cdee4eece636997ad7 (diff)
downloadlibssh-51436cc3a344bdbef64d138b927bc8d5e0a116b2.tar.gz
libssh-51436cc3a344bdbef64d138b927bc8d5e0a116b2.tar.xz
libssh-51436cc3a344bdbef64d138b927bc8d5e0a116b2.zip
Fixed a build warning in ssh_userauth_autopubkey.
-rw-r--r--libssh/auth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libssh/auth.c b/libssh/auth.c
index 1d75554b..bd4d64c3 100644
--- a/libssh/auth.c
+++ b/libssh/auth.c
@@ -1006,12 +1006,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;