From: serassio <> Date: Thu, 15 Jun 2006 01:29:30 +0000 (+0000) Subject: Bug #1604: segfault on cachemgr when no redirectors defined X-Git-Tag: SQUID_3_0_PRE4~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=587609e984917147bd8ae21322a3c8b00dccfe44;p=thirdparty%2Fsquid.git Bug #1604: segfault on cachemgr when no redirectors defined Patch provided by Gonzalo Arana. --- diff --git a/src/redirect.cc b/src/redirect.cc index 145d7c6007..e47574e660 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -1,6 +1,6 @@ /* - * $Id: redirect.cc,v 1.112 2006/05/29 00:15:02 robertc Exp $ + * $Id: redirect.cc,v 1.113 2006/06/14 19:29:30 serassio Exp $ * * DEBUG: section 61 Redirector * AUTHOR: Duane Wessels @@ -94,6 +94,11 @@ redirectStateFree(redirectStateData * r) static void redirectStats(StoreEntry * sentry) { + if (redirectors == NULL) { + storeAppendPrintf(sentry, "No redirectors defined\n"); + return; + } + storeAppendPrintf(sentry, "Redirector Statistics:\n"); helperStats(sentry, redirectors);