summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2020-07-03 07:25:19 +0000
committerDamien Miller <djm@cvs.openbsd.org>2020-07-03 07:25:19 +0000
commit72b1ca4b8935157d2e5acebb540255dacef2f8de (patch)
tree418e989c31fd18560dfc5565c6526681d75a122f /usr.bin/ssh
parent7d3d492454524dff8fdd33956b44fe288b005467 (diff)
put back the mux_ctx memleak fix, but only for channels of type
SSH_CHANNEL_MUX_LISTENER; Specifically SSH_CHANNEL_MUX_PROXY channels should not have this structure freed.
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/channels.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 0efb095d17f..fbb2fce445c 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.400 2020/07/03 07:17:35 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.401 2020/07/03 07:25:18 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -593,6 +593,10 @@ channel_free(struct ssh *ssh, Channel *c)
if (c->type == SSH_CHANNEL_MUX_CLIENT)
mux_remove_remote_forwardings(ssh, c);
+ else if (c->type == SSH_CHANNEL_MUX_LISTENER) {
+ free(c->mux_ctx);
+ c->mux_ctx = NULL;
+ }
if (log_level_get() >= SYSLOG_LEVEL_DEBUG3) {
s = channel_open_message(ssh);