From 1d55ca748d6f1cab42aba290a0b77bd142830401 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 14 Mar 2005 22:58:40 +1100 Subject: - dtucker@cvs.openbsd.org 2005/03/10 10:15:02 [readconf.c] Check listen addresses for null, prevents xfree from dying during ClearAllForwardings (bz #996). From Craig Leres, ok markus@ --- ChangeLog | 9 ++++++++- readconf.c | 8 +++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f04d680c..897f1c582 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +20050314 + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2005/03/10 10:15:02 + [readconf.c] + Check listen addresses for null, prevents xfree from dying during + ClearAllForwardings (bz #996). From Craig Leres, ok markus@ + 20050313 - (dtucker) [contrib/cygwin/ssh-host-config] Makes the query for the localized name of the local administrators group more reliable. From @@ -2326,4 +2333,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3709 2005/03/13 10:20:18 dtucker Exp $ +$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 @@ */ #include "includes.h" -RCSID("$OpenBSD: readconf.c,v 1.137 2005/03/04 08:48:06 djm Exp $"); +RCSID("$OpenBSD: readconf.c,v 1.138 2005/03/10 10:15:02 dtucker Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -253,12 +253,14 @@ clear_forwardings(Options *options) int i; for (i = 0; i < options->num_local_forwards; i++) { - xfree(options->local_forwards[i].listen_host); + if (options->local_forwards[i].listen_host != NULL) + xfree(options->local_forwards[i].listen_host); xfree(options->local_forwards[i].connect_host); } options->num_local_forwards = 0; for (i = 0; i < options->num_remote_forwards; i++) { - xfree(options->remote_forwards[i].listen_host); + if (options->remote_forwards[i].listen_host != NULL) + xfree(options->remote_forwards[i].listen_host); xfree(options->remote_forwards[i].connect_host); } options->num_remote_forwards = 0; -- cgit v1.2.3