mirror of git://anongit.mindrot.org/openssh.git
upstream: fix minor memleak of kex->hostkey_alg on rekex
OpenBSD-Commit-ID: 2c3969c74966d4ccdfeff5e5f0df0791919aef50
This commit is contained in:
parent
ac0364b85e
commit
553b90feed
3
kex.c
3
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.
|
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -837,6 +837,7 @@ choose_kex(struct kex *k, char *client, char *server)
|
||||||
static int
|
static int
|
||||||
choose_hostkeyalg(struct kex *k, char *client, char *server)
|
choose_hostkeyalg(struct kex *k, char *client, char *server)
|
||||||
{
|
{
|
||||||
|
free(k->hostkey_alg);
|
||||||
k->hostkey_alg = match_list(client, server, NULL);
|
k->hostkey_alg = match_list(client, server, NULL);
|
||||||
|
|
||||||
debug("kex: host key algorithm: %s",
|
debug("kex: host key algorithm: %s",
|
||||||
|
|
Loading…
Reference in New Issue