summaryrefslogtreecommitdiff
path: root/mux.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-07-31 03:07:24 +0000
committerDamien Miller <djm@mindrot.org>2018-07-31 13:13:26 +1000
commit1a66079c0669813306cc69e5776a4acd9fb49015 (patch)
tree892eb2fcddac9189cc1d8e7a9b821bde27ba1014 /mux.c
parent87f08be054b7eeadbb9cdeb3fb4872be79ccf218 (diff)
upstream: fix some memory leaks spotted by Coverity via Jakub Jelen
in bz#2366 feedback and ok dtucker@ OpenBSD-Commit-ID: 8402bbae67d578bedbadb0ce68ff7c5a136ef563
Diffstat (limited to 'mux.c')
-rw-r--r--mux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mux.c b/mux.c
index 6394e3e18..e607acd08 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.74 2018/07/11 18:53:29 markus Exp $ */ 1/* $OpenBSD: mux.c,v 1.75 2018/07/31 03:07:24 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -1042,6 +1042,7 @@ process_mux_stdio_fwd(struct ssh *ssh, u_int rid,
1042 set_nonblock(new_fd[1]); 1042 set_nonblock(new_fd[1]);
1043 1043
1044 nc = channel_connect_stdio_fwd(ssh, chost, cport, new_fd[0], new_fd[1]); 1044 nc = channel_connect_stdio_fwd(ssh, chost, cport, new_fd[0], new_fd[1]);
1045 free(chost);
1045 1046
1046 nc->ctl_chan = c->self; /* link session -> control channel */ 1047 nc->ctl_chan = c->self; /* link session -> control channel */
1047 c->remote_id = nc->self; /* link control -> session channel */ 1048 c->remote_id = nc->self; /* link control -> session channel */