From: wessels <> Date: Wed, 20 Mar 2002 06:40:46 +0000 (+0000) Subject: avoid NULL pointer access in case somewhere we call X-Git-Tag: SQUID_3_0_PRE1~1164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5421d4c1aa47b7cf1da6852af62e782ddab2f0db;p=thirdparty%2Fsquid.git avoid NULL pointer access in case somewhere we call storeCreateSwapDirectories for a storage system that didn't define newfs(). --- diff --git a/src/store_dir.cc b/src/store_dir.cc index dbba5c9bcb..6f1336baf4 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir.cc,v 1.135 2001/10/24 08:19:09 hno Exp $ + * $Id: store_dir.cc,v 1.136 2002/03/19 23:40:46 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -84,7 +84,8 @@ storeCreateSwapDirectories(void) if (fork()) continue; sd = &Config.cacheSwap.swapDirs[i]; - sd->newfs(sd); + if (NULL != sd->newfs) + sd->newfs(sd); exit(0); } do {