1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

auth: Fix a possible double free.

This commit is contained in:
Andreas Schneider
2012-01-01 21:48:47 +01:00
parent c08bdf5917
commit 0b7b699ced

View File

@@ -1194,7 +1194,9 @@ int ssh_userauth_publickey_auto(ssh_session session,
"Public key for %s refused by server", "Public key for %s refused by server",
privkey_file); privkey_file);
ssh_key_free(state->privkey); ssh_key_free(state->privkey);
state->privkey = NULL;
ssh_key_free(state->pubkey); ssh_key_free(state->pubkey);
state->pubkey = NULL;
state->it=state->it->next; state->it=state->it->next;
continue; continue;
} }