[openssh-commits] [openssh] 01/01: upstream: put back the mux_ctx memleak fix for SSH_CHANNEL_MUX_CLIENT

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Sep 15 15:58:27 AEST 2021


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit d0fffc88c8fe90c1815c6f4097bc8cbcabc0f3dd
Author: mbuhl at openbsd.org <mbuhl at openbsd.org>
Date:   Tue Sep 14 11:04:21 2021 +0000

    upstream: put back the mux_ctx memleak fix for SSH_CHANNEL_MUX_CLIENT
    
    OK mfriedl@
    
    OpenBSD-Commit-ID: 1aba1da828956cacaadb81a637338734697d9798
---
 channels.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/channels.c b/channels.c
index fd72f371..1c714c84 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.407 2021/05/19 01:24:05 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.408 2021/09/14 11:04:21 mbuhl Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -629,9 +629,11 @@ channel_free(struct ssh *ssh, Channel *c)
 	debug("channel %d: free: %s, nchannels %u", c->self,
 	    c->remote_name ? c->remote_name : "???", n);
 
-	if (c->type == SSH_CHANNEL_MUX_CLIENT)
+	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;
+	} else if (c->type == SSH_CHANNEL_MUX_LISTENER) {
 		free(c->mux_ctx);
 		c->mux_ctx = NULL;
 	}

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


More information about the openssh-commits mailing list