summaryrefslogtreecommitdiff
path: root/ssh_api.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2020-07-01 16:28:31 +0000
committerDamien Miller <djm@mindrot.org>2020-07-03 15:12:31 +1000
commit55ef3e9cbd5b336bd0f89205716924886fcf86de (patch)
treef0a8b997b16f866a6dbb612cf14efeb4de817f47 /ssh_api.c
parente1c401109b61f7dbc199b5099933d579e7fc5dc9 (diff)
downloadopenssh-git-55ef3e9cbd5b336bd0f89205716924886fcf86de.tar.gz
upstream: free kex in ssh_packet_close; ok djm semarie
OpenBSD-Commit-ID: dbc181e90d3d32fd97b10d75e68e374270e070a2
Diffstat (limited to 'ssh_api.c')
-rw-r--r--ssh_api.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ssh_api.c b/ssh_api.c
index e0b19552..a0358d4b 100644
--- a/ssh_api.c
+++ b/ssh_api.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh_api.c,v 1.19 2019/10/31 21:23:19 djm Exp $ */
+/* $OpenBSD: ssh_api.c,v 1.20 2020/07/01 16:28:31 markus Exp $ */
/*
* Copyright (c) 2012 Markus Friedl. All rights reserved.
*
@@ -152,7 +152,6 @@ ssh_free(struct ssh *ssh)
{
struct key_entry *k;
- ssh_packet_close(ssh);
/*
* we've only created the public keys variants in case we
* are a acting as a server.
@@ -167,8 +166,7 @@ ssh_free(struct ssh *ssh)
TAILQ_REMOVE(&ssh->private_keys, k, next);
free(k);
}
- if (ssh->kex)
- kex_free(ssh->kex);
+ ssh_packet_close(ssh);
free(ssh);
}