diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2020-12-04 02:27:58 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2020-12-04 02:27:58 +0000 |
commit | 67bb496536bd7ed281b08ae01807cffc0d3d22de (patch) | |
tree | 236f1c312f6f0e647e0b196a00fa72615384ba36 /usr.bin/ssh/kex.c | |
parent | 0dc499dfef27833bae9a64ec35dd0e0fb6e0b1d8 (diff) |
fix minor memleak of kex->hostkey_alg on rekex
Diffstat (limited to 'usr.bin/ssh/kex.c')
-rw-r--r-- | usr.bin/ssh/kex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c index 1c8443903ec..e7b3e4d7491 100644 --- a/usr.bin/ssh/kex.c +++ b/usr.bin/ssh/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. * @@ -822,6 +822,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", |