From 98ed37f517eedae2077c67da736871861d0abddc Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 20 Apr 2019 08:19:44 +0100 Subject: [PATCH] ssh2connection: missing free of antispoof_prompt. Just noticed that if the session were to abort while that variable contains some allocated data, it wouldn't be freed. --- ssh2connection.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssh2connection.c b/ssh2connection.c index 163cc5c9..96191c70 100644 --- a/ssh2connection.c +++ b/ssh2connection.c @@ -310,6 +310,9 @@ static void ssh2_connection_free(PacketProtocolLayer *ppl) } portfwdmgr_free(s->portfwdmgr); + if (s->antispoof_prompt) + free_prompts(s->antispoof_prompt); + delete_callbacks_for_context(s); sfree(s); @@ -999,6 +1002,7 @@ static void ssh2_connection_process_queue(PacketProtocolLayer *ppl) s->want_user_input = false; } free_prompts(s->antispoof_prompt); + s->antispoof_prompt = NULL; } /*