mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-29 00:34:33 +02:00
upstream: fix kex mem-leak in ssh_packet_close; ok djm
OpenBSD-Commit-ID: e2e9533f393620383afd0b68ef435de8d5e8abe4
This commit is contained in:
parent
e35995088c
commit
07f5f369a2
4
packet.c
4
packet.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: packet.c,v 1.292 2020/06/24 15:10:38 markus Exp $ */
|
/* $OpenBSD: packet.c,v 1.293 2020/06/24 15:12:09 markus Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -616,6 +616,8 @@ ssh_packet_close_internal(struct ssh *ssh, int do_close)
|
|||||||
state->newkeys[mode] = NULL;
|
state->newkeys[mode] = NULL;
|
||||||
ssh_clear_newkeys(ssh, mode); /* next keys */
|
ssh_clear_newkeys(ssh, mode); /* next keys */
|
||||||
}
|
}
|
||||||
|
kex_free(ssh->kex);
|
||||||
|
ssh->kex = NULL;
|
||||||
#ifdef WITH_ZLIB
|
#ifdef WITH_ZLIB
|
||||||
/* compression state is in shared mem, so we can only release it once */
|
/* compression state is in shared mem, so we can only release it once */
|
||||||
if (do_close && state->compression_buffer) {
|
if (do_close && state->compression_buffer) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user