From 1e0b966b738d03d59030e9aea99360edf45fd8b3 Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Wed, 25 Nov 2020 16:25:21 +0000 Subject: [PATCH] Fix minor memory leak in rsa-sha2-256 userauth. --- ssh2userauth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ssh2userauth.c b/ssh2userauth.c index 7d3a81e3..01243baf 100644 --- a/ssh2userauth.c +++ b/ssh2userauth.c @@ -862,6 +862,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) s->publickey_algorithm = dupstr("rsa-sha2-512"); s->signflags = SSH_AGENT_RSA_SHA2_512; } else if (s->ppl.bpp->ext_info_rsa_sha256_ok) { + sfree(s->publickey_algorithm); s->publickey_algorithm = dupstr("rsa-sha2-256"); s->signflags = SSH_AGENT_RSA_SHA2_256; }