diff options
author | markus@openbsd.org <markus@openbsd.org> | 2018-07-27 12:03:17 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-07-31 12:20:13 +1000 |
commit | 5d14019ba2ff54acbfd20a6b9b96bb860a8c7c31 (patch) | |
tree | dfb3f5005c234e3e22c3cd5a2d2dc0adef734691 /channels.c | |
parent | e655ee04a3cb7999dbf9641b25192353e2b69418 (diff) |
upstream: avoid expensive channel_open_message() calls; ok djm@
OpenBSD-Commit-ID: aea3b5512ad681cd8710367d743e8a753d4425d9
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/channels.c b/channels.c index 1de63c216..e90f7fea9 100644 --- a/channels.c +++ b/channels.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: channels.c,v 1.383 2018/07/11 18:53:29 markus Exp $ */ | 1 | /* $OpenBSD: channels.c,v 1.384 2018/07/27 12:03:17 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -608,9 +608,11 @@ channel_free(struct ssh *ssh, Channel *c) | |||
608 | if (c->type == SSH_CHANNEL_MUX_CLIENT) | 608 | if (c->type == SSH_CHANNEL_MUX_CLIENT) |
609 | mux_remove_remote_forwardings(ssh, c); | 609 | mux_remove_remote_forwardings(ssh, c); |
610 | 610 | ||
611 | s = channel_open_message(ssh); | 611 | if (log_level_get() >= SYSLOG_LEVEL_DEBUG3) { |
612 | debug3("channel %d: status: %s", c->self, s); | 612 | s = channel_open_message(ssh); |
613 | free(s); | 613 | debug3("channel %d: status: %s", c->self, s); |
614 | free(s); | ||
615 | } | ||
614 | 616 | ||
615 | channel_close_fds(ssh, c); | 617 | channel_close_fds(ssh, c); |
616 | sshbuf_free(c->input); | 618 | sshbuf_free(c->input); |