summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/auth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/auth.c b/src/auth.c
index bb08404e..d56111d2 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -649,7 +649,7 @@ static int ssh_userauth_agent_publickey(ssh_session session,
const char *username,
ssh_key pubkey)
{
- ssh_string str;
+ ssh_string str = NULL;
int rc;
switch(session->pending_call_state) {
@@ -723,6 +723,7 @@ pending:
fail:
ssh_set_error_oom(session);
ssh_buffer_reinit(session->out_buffer);
+ ssh_string_free(str);
return SSH_AUTH_ERROR;
}