From 066ef682f39f3ec3f60f4ccc3a13a284de5ed6c9 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 20 May 1998 12:34:38 +0000 Subject: [PATCH] More paranoid about freeing pointers. --- isdnlog/tools/isdnconf.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/isdnlog/tools/isdnconf.c b/isdnlog/tools/isdnconf.c index e622ff56..092c1763 100644 --- a/isdnlog/tools/isdnconf.c +++ b/isdnlog/tools/isdnconf.c @@ -1,4 +1,4 @@ -/* $Id: isdnconf.c,v 1.16 1998/05/19 15:55:57 paul Exp $ +/* $Id: isdnconf.c,v 1.17 1998/05/20 12:34:38 paul Exp $ * * ISDN accounting for isdn4linux. (Utilities) * @@ -20,6 +20,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: isdnconf.c,v $ + * Revision 1.17 1998/05/20 12:34:38 paul + * More paranoid about freeing pointers. + * * Revision 1.16 1998/05/19 15:55:57 paul * Moved config stuff for City Weekend from isdnlog.c to tools/isdnconf.c, so * that isdnrep also understands a "cityweekend=y" line in isdn.conf. @@ -1054,8 +1057,10 @@ static int Set_Globals(section *SPtr) { while (sPtr != NULL) { - free(sPtr[0]); - free(sPtr[1]); + if (sPtr[0]) + free(sPtr[0]); + if (sPtr[1]) + free(sPtr[1]); free(sPtr); sPtr++;