diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2024-03-06 03:00:00 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2024-03-06 03:00:00 +0000 |
commit | 6870dc48d89b8193e38204cea1b59f77e8a8a16d (patch) | |
tree | cbf6d6195c8ab40a1ab10df6337f2d1a983f1ca4 /usr.bin | |
parent | ff536b95eab330c9a6ba23c6230a250b1f5cccf5 (diff) |
fix memory leak in mux proxy mode when requesting forwarding.
found by RASU JSC, reported by Maks Mishin in GHPR#467
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/channels.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index 96409624753..d07232df21b 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.436 2024/01/09 22:19:00 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.437 2024/03/06 02:59:59 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -3203,9 +3203,8 @@ channel_proxy_downstream(struct ssh *ssh, Channel *downstream) goto out; } /* Record that connection to this host/port is permitted. */ - permission_set_add(ssh, FORWARD_USER, FORWARD_LOCAL, "<mux>", -1, - listen_host, NULL, (int)listen_port, downstream); - listen_host = NULL; + permission_set_add(ssh, FORWARD_USER, FORWARD_LOCAL, "<mux>", + -1, listen_host, NULL, (int)listen_port, downstream); break; case SSH2_MSG_CHANNEL_CLOSE: if (have < 4) |