From d1677465dcb7f1a2341756a814b971d3cfe978ba Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 3 Jul 2020 05:08:42 +0000 Subject: fix memory leak of mux_ctx; patch from Sergiy Lozovsky via bz3189 ok dtucker --- usr.bin/ssh/channels.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin/ssh') diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index f29b324116c..cd2e269d39a 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.398 2020/04/25 06:59:36 dtucker Exp $ */ +/* $OpenBSD: channels.c,v 1.399 2020/07/03 05:08:41 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -611,6 +611,8 @@ channel_free(struct ssh *ssh, Channel *c) c->path = NULL; free(c->listening_addr); c->listening_addr = NULL; + free(c->mux_ctx); + c->mux_ctx = NULL; while ((cc = TAILQ_FIRST(&c->status_confirms)) != NULL) { if (cc->abandon_cb != NULL) cc->abandon_cb(ssh, c, cc->ctx); -- cgit v1.2.3