[openssh-commits] [openssh] 04/07: upstream: fix minor memleak of kex->hostkey_alg on rekex

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Dec 4 13:43:57 AEDT 2020


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 553b90feedd7da5b90901d73005f86705456d686
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Dec 4 02:27:57 2020 +0000

    upstream: fix minor memleak of kex->hostkey_alg on rekex
    
    OpenBSD-Commit-ID: 2c3969c74966d4ccdfeff5e5f0df0791919aef50
---
 kex.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kex.c b/kex.c
index b9f45dd7..4a36310a 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.161 2020/12/04 02:27:08 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.162 2020/12/04 02:27:57 djm Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  *
@@ -837,6 +837,7 @@ choose_kex(struct kex *k, char *client, char *server)
 static int
 choose_hostkeyalg(struct kex *k, char *client, char *server)
 {
+	free(k->hostkey_alg);
 	k->hostkey_alg = match_list(client, server, NULL);
 
 	debug("kex: host key algorithm: %s",

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list