From: djm Date: Wed, 6 Mar 2024 02:59:59 +0000 (+0000) Subject: fix memory leak in mux proxy mode when requesting forwarding. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e7a0677564a6aed2b5c8ae9f74cb00a883081592;p=openbsd fix memory leak in mux proxy mode when requesting forwarding. found by RASU JSC, reported by Maks Mishin in GHPR#467 --- 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 * Copyright (c) 1995 Tatu Ylonen , 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, "", -1, - listen_host, NULL, (int)listen_port, downstream); - listen_host = NULL; + permission_set_add(ssh, FORWARD_USER, FORWARD_LOCAL, "", + -1, listen_host, NULL, (int)listen_port, downstream); break; case SSH2_MSG_CHANNEL_CLOSE: if (have < 4)