diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | readconf.c | 8 |
2 files changed, 13 insertions, 4 deletions
@@ -1,3 +1,10 @@ | |||
1 | 20050314 | ||
2 | - (dtucker) OpenBSD CVS Sync | ||
3 | - dtucker@cvs.openbsd.org 2005/03/10 10:15:02 | ||
4 | [readconf.c] | ||
5 | Check listen addresses for null, prevents xfree from dying during | ||
6 | ClearAllForwardings (bz #996). From Craig Leres, ok markus@ | ||
7 | |||
1 | 20050313 | 8 | 20050313 |
2 | - (dtucker) [contrib/cygwin/ssh-host-config] Makes the query for the | 9 | - (dtucker) [contrib/cygwin/ssh-host-config] Makes the query for the |
3 | localized name of the local administrators group more reliable. From | 10 | localized name of the local administrators group more reliable. From |
@@ -2326,4 +2333,4 @@ | |||
2326 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 2333 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
2327 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 2334 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
2328 | 2335 | ||
2329 | $Id: ChangeLog,v 1.3709 2005/03/13 10:20:18 dtucker Exp $ | 2336 | $Id: ChangeLog,v 1.3710 2005/03/14 11:58:40 dtucker Exp $ |
diff --git a/readconf.c b/readconf.c index 7173a8c23..f35fe5647 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: readconf.c,v 1.137 2005/03/04 08:48:06 djm Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.138 2005/03/10 10:15:02 dtucker Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -253,12 +253,14 @@ clear_forwardings(Options *options) | |||
253 | int i; | 253 | int i; |
254 | 254 | ||
255 | for (i = 0; i < options->num_local_forwards; i++) { | 255 | for (i = 0; i < options->num_local_forwards; i++) { |
256 | xfree(options->local_forwards[i].listen_host); | 256 | if (options->local_forwards[i].listen_host != NULL) |
257 | xfree(options->local_forwards[i].listen_host); | ||
257 | xfree(options->local_forwards[i].connect_host); | 258 | xfree(options->local_forwards[i].connect_host); |
258 | } | 259 | } |
259 | options->num_local_forwards = 0; | 260 | options->num_local_forwards = 0; |
260 | for (i = 0; i < options->num_remote_forwards; i++) { | 261 | for (i = 0; i < options->num_remote_forwards; i++) { |
261 | xfree(options->remote_forwards[i].listen_host); | 262 | if (options->remote_forwards[i].listen_host != NULL) |
263 | xfree(options->remote_forwards[i].listen_host); | ||
262 | xfree(options->remote_forwards[i].connect_host); | 264 | xfree(options->remote_forwards[i].connect_host); |
263 | } | 265 | } |
264 | options->num_remote_forwards = 0; | 266 | options->num_remote_forwards = 0; |