mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user