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

auth: Fix a memory leak in agent publickey auth.

CID: 1230358

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
This commit is contained in:
Andreas Schneider
2014-08-15 10:35:37 +02:00
parent 8b7627efd5
commit 5fa4721c6e

View File

@@ -649,7 +649,7 @@ static int ssh_userauth_agent_publickey(ssh_session session,
const char *username, const char *username,
ssh_key pubkey) ssh_key pubkey)
{ {
ssh_string str; ssh_string str = NULL;
int rc; int rc;
switch(session->pending_call_state) { switch(session->pending_call_state) {
@@ -723,6 +723,7 @@ pending:
fail: fail:
ssh_set_error_oom(session); ssh_set_error_oom(session);
ssh_buffer_reinit(session->out_buffer); ssh_buffer_reinit(session->out_buffer);
ssh_string_free(str);
return SSH_AUTH_ERROR; return SSH_AUTH_ERROR;
} }