summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2020-07-03 05:08:42 +0000
committerDamien Miller <djm@cvs.openbsd.org>2020-07-03 05:08:42 +0000
commitd1677465dcb7f1a2341756a814b971d3cfe978ba (patch)
tree0f76057278edea72a86bd53694b034bd71263725 /usr.bin/ssh
parentf60c69aaa3c67b527c059508a520f53b55ad0f89 (diff)
fix memory leak of mux_ctx; patch from Sergiy Lozovsky via bz3189
ok dtucker
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/channels.c4
1 files changed, 3 insertions, 1 deletions
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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, 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);