From 84fa07cfebba2e82738568427d9feb55f782d7cd Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 2 Feb 2020 18:53:15 +0000 Subject: [PATCH] userauth: fix two small memory leaks. Happened to notice these while I was testing the last few commits. --- ssh2userauth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ssh2userauth.c b/ssh2userauth.c index 6a0b47a1..e8b251ba 100644 --- a/ssh2userauth.c +++ b/ssh2userauth.c @@ -780,6 +780,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) ppl_printf("Pageant failed to " "provide a signature\r\n"); s->suppress_wait_for_response_packet = true; + ssh_free_pktout(s->pktout); } } } @@ -1332,6 +1333,8 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) } if (sb->len) s->cur_prompt->instruction = strbuf_to_str(sb); + else + strbuf_free(sb); /* * Our prompts_t is fully constructed now. Get the