summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/auth.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/auth.c b/src/auth.c
index b4b17eb..dc9e34a 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -1194,7 +1194,9 @@ int ssh_userauth_publickey_auto(ssh_session session,
"Public key for %s refused by server",
privkey_file);
ssh_key_free(state->privkey);
+ state->privkey = NULL;
ssh_key_free(state->pubkey);
+ state->pubkey = NULL;
state->it=state->it->next;
continue;
}