]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1604: segfault on cachemgr when no redirectors defined
authorserassio <>
Thu, 15 Jun 2006 01:29:30 +0000 (01:29 +0000)
committerserassio <>
Thu, 15 Jun 2006 01:29:30 +0000 (01:29 +0000)
Patch provided by Gonzalo Arana.

src/redirect.cc

index 145d7c6007808ab08109df5b302604a9a3ff01d8..e47574e6602372b75af63bd0a376ede8fe9107df 100644 (file)
@@ -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);