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)
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 e0b195521..a0358d4be 100644
--- a/ssh_api.c
+++ b/ssh_api.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh_api.c,v 1.19 2019/10/31 21:23:19 djm Exp $ */ 1/* $OpenBSD: ssh_api.c,v 1.20 2020/07/01 16:28:31 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2012 Markus Friedl. All rights reserved. 3 * Copyright (c) 2012 Markus Friedl. All rights reserved.
4 * 4 *
@@ -152,7 +152,6 @@ ssh_free(struct ssh *ssh)
152{ 152{
153 struct key_entry *k; 153 struct key_entry *k;
154 154
155 ssh_packet_close(ssh);
156 /* 155 /*
157 * we've only created the public keys variants in case we 156 * we've only created the public keys variants in case we
158 * are a acting as a server. 157 * are a acting as a server.
@@ -167,8 +166,7 @@ ssh_free(struct ssh *ssh)
167 TAILQ_REMOVE(&ssh->private_keys, k, next); 166 TAILQ_REMOVE(&ssh->private_keys, k, next);
168 free(k); 167 free(k);
169 } 168 }
170 if (ssh->kex) 169 ssh_packet_close(ssh);
171 kex_free(ssh->kex);
172 free(ssh); 170 free(ssh);
173} 171}
174 172