diff options
author | Darren Tucker <dtucker@zip.com.au> | 2007-12-02 23:12:30 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2007-12-02 23:12:30 +1100 |
commit | 23ae8ca9487a69533e39e3da1f63b88f5bee5629 (patch) | |
tree | e10e855911b4bc099c5debc946b8143fed684596 | |
parent | 63b31cb9437185dff9574f0245e6953bb7651759 (diff) |
- djm@cvs.openbsd.org 2007/11/03 00:36:14
[clientloop.c]
fix memory leak in process_cmdline(), patch from Jan.Pechanec AT Sun.COM;
ok dtucker@
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | clientloop.c | 9 |
2 files changed, 13 insertions, 2 deletions
@@ -26,6 +26,10 @@ | |||
26 | - jmc@cvs.openbsd.org 2007/10/29 07:48:19 | 26 | - jmc@cvs.openbsd.org 2007/10/29 07:48:19 |
27 | [ssh_config.5] | 27 | [ssh_config.5] |
28 | clean up after previous macro removal; | 28 | clean up after previous macro removal; |
29 | - djm@cvs.openbsd.org 2007/11/03 00:36:14 | ||
30 | [clientloop.c] | ||
31 | fix memory leak in process_cmdline(), patch from Jan.Pechanec AT Sun.COM; | ||
32 | ok dtucker@ | ||
29 | 33 | ||
30 | 20071030 | 34 | 20071030 |
31 | - (djm) OpenBSD CVS Sync | 35 | - (djm) OpenBSD CVS Sync |
@@ -3443,4 +3447,4 @@ | |||
3443 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 3447 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
3444 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 3448 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
3445 | 3449 | ||
3446 | $Id: ChangeLog,v 1.4802 2007/12/02 12:09:30 dtucker Exp $ | 3450 | $Id: ChangeLog,v 1.4803 2007/12/02 12:12:30 dtucker Exp $ |
diff --git a/clientloop.c b/clientloop.c index 7a61cb74d..ba53de483 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.c,v 1.182 2007/09/04 03:21:03 djm Exp $ */ | 1 | /* $OpenBSD: clientloop.c,v 1.183 2007/11/03 00:36:14 djm 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 |
@@ -953,6 +953,9 @@ process_cmdline(void) | |||
953 | u_short cancel_port; | 953 | u_short cancel_port; |
954 | Forward fwd; | 954 | Forward fwd; |
955 | 955 | ||
956 | bzero(&fwd, sizeof(fwd)); | ||
957 | fwd.listen_host = fwd.connect_host = NULL; | ||
958 | |||
956 | leave_raw_mode(); | 959 | leave_raw_mode(); |
957 | handler = signal(SIGINT, SIG_IGN); | 960 | handler = signal(SIGINT, SIG_IGN); |
958 | cmd = s = read_passphrase("\r\nssh> ", RP_ECHO); | 961 | cmd = s = read_passphrase("\r\nssh> ", RP_ECHO); |
@@ -1052,6 +1055,10 @@ out: | |||
1052 | enter_raw_mode(); | 1055 | enter_raw_mode(); |
1053 | if (cmd) | 1056 | if (cmd) |
1054 | xfree(cmd); | 1057 | xfree(cmd); |
1058 | if (fwd.listen_host != NULL) | ||
1059 | xfree(fwd.listen_host); | ||
1060 | if (fwd.connect_host != NULL) | ||
1061 | xfree(fwd.connect_host); | ||
1055 | } | 1062 | } |
1056 | 1063 | ||
1057 | /* process the characters one by one */ | 1064 | /* process the characters one by one */ |