diff options
author | Darren Tucker <dtucker@zip.com.au> | 2007-12-02 23:01:03 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2007-12-02 23:01:03 +1100 |
commit | 32e42c74a54ba10bf6859f83b52e5b5e7d3c796a (patch) | |
tree | 9d1ca82c3ac6dd3a7a06a404b0e1391c8cd9a1a0 | |
parent | 541dab2db4e89ffdcf9e7a7316765465d601fc32 (diff) |
- dtucker@cvs.openbsd.org 2007/10/29 01:55:04
[ssh.c]
Plug tiny mem leaks in ControlPath and ProxyCommand option processing;
ok djm@
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh.c | 11 |
2 files changed, 13 insertions, 4 deletions
@@ -8,6 +8,10 @@ | |||
8 | [auth2-gss.c] | 8 | [auth2-gss.c] |
9 | Allow build without -DGSSAPI; ok deraadt@ | 9 | Allow build without -DGSSAPI; ok deraadt@ |
10 | (Id sync only, Portable already has the ifdefs) | 10 | (Id sync only, Portable already has the ifdefs) |
11 | - dtucker@cvs.openbsd.org 2007/10/29 01:55:04 | ||
12 | [ssh.c] | ||
13 | Plug tiny mem leaks in ControlPath and ProxyCommand option processing; | ||
14 | ok djm@ | ||
11 | 15 | ||
12 | 20071030 | 16 | 20071030 |
13 | - (djm) OpenBSD CVS Sync | 17 | - (djm) OpenBSD CVS Sync |
@@ -3425,4 +3429,4 @@ | |||
3425 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 3429 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
3426 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 3430 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
3427 | 3431 | ||
3428 | $Id: ChangeLog,v 1.4797 2007/12/02 11:59:45 dtucker Exp $ | 3432 | $Id: ChangeLog,v 1.4798 2007/12/02 12:01:03 dtucker Exp $ |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.303 2007/09/04 11:15:55 djm Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.304 2007/10/29 01:55:04 dtucker 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 |
@@ -658,11 +658,15 @@ main(int ac, char **av) | |||
658 | } | 658 | } |
659 | 659 | ||
660 | if (options.proxy_command != NULL && | 660 | if (options.proxy_command != NULL && |
661 | strcmp(options.proxy_command, "none") == 0) | 661 | strcmp(options.proxy_command, "none") == 0) { |
662 | xfree(options.proxy_command); | ||
662 | options.proxy_command = NULL; | 663 | options.proxy_command = NULL; |
664 | } | ||
663 | if (options.control_path != NULL && | 665 | if (options.control_path != NULL && |
664 | strcmp(options.control_path, "none") == 0) | 666 | strcmp(options.control_path, "none") == 0) { |
667 | xfree(options.control_path); | ||
665 | options.control_path = NULL; | 668 | options.control_path = NULL; |
669 | } | ||
666 | 670 | ||
667 | if (options.control_path != NULL) { | 671 | if (options.control_path != NULL) { |
668 | char thishost[NI_MAXHOST]; | 672 | char thishost[NI_MAXHOST]; |
@@ -672,6 +676,7 @@ main(int ac, char **av) | |||
672 | snprintf(buf, sizeof(buf), "%d", options.port); | 676 | snprintf(buf, sizeof(buf), "%d", options.port); |
673 | cp = tilde_expand_filename(options.control_path, | 677 | cp = tilde_expand_filename(options.control_path, |
674 | original_real_uid); | 678 | original_real_uid); |
679 | xfree(options.control_path); | ||
675 | options.control_path = percent_expand(cp, "p", buf, "h", host, | 680 | options.control_path = percent_expand(cp, "p", buf, "h", host, |
676 | "r", options.user, "l", thishost, (char *)NULL); | 681 | "r", options.user, "l", thishost, (char *)NULL); |
677 | xfree(cp); | 682 | xfree(cp); |