diff --git a/src/auth.c b/src/auth.c index b4b17eb5..dc9e34a0 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; }