[openssh-commits] [openssh] 02/05: upstream: free kex in ssh_packet_close; ok djm semarie
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Jul 3 15:16:47 AEST 2020
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 55ef3e9cbd5b336bd0f89205716924886fcf86de
Author: markus at openbsd.org <markus at openbsd.org>
Date: Wed Jul 1 16:28:31 2020 +0000
upstream: free kex in ssh_packet_close; ok djm semarie
OpenBSD-Commit-ID: dbc181e90d3d32fd97b10d75e68e374270e070a2
---
packet.c | 4 +++-
ssh_api.c | 6 ++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/packet.c b/packet.c
index 9ffd9f59..042ec7c4 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.294 2020/06/26 11:26:01 semarie Exp $ */
+/* $OpenBSD: packet.c,v 1.295 2020/07/01 16:28:31 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -654,6 +654,8 @@ ssh_packet_close_internal(struct ssh *ssh, int do_close)
ssh->remote_ipaddr = NULL;
free(ssh->state);
ssh->state = NULL;
+ kex_free(ssh->kex);
+ ssh->kex = NULL;
}
}
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);
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list