[openssh-commits] [openssh] 01/01: upstream: put back the mux_ctx memleak fix, but only for channels of

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jul 3 17:26:31 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 aa6fa4bf3023fa0e5761cd8f4b2cd015d2de74dd
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Jul 3 07:25:18 2020 +0000

    upstream: 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.
    
    OpenBSD-Commit-ID: f3b213ae60405f77439e2b06262f054760c9d325
---
 channels.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/channels.c b/channels.c
index f23066df..71c94f6c 100644
--- a/channels.c
+++ b/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 at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -603,6 +603,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);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list