]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #829: icp denied query causes squid to fail assert src/HttpHeader.cc:374
authorserassio <>
Sun, 5 Jun 2005 21:12:46 +0000 (21:12 +0000)
committerserassio <>
Sun, 5 Jun 2005 21:12:46 +0000 (21:12 +0000)
          because hdr->owner == 0

icp_request is already self-destroyed at the end of icpAccessAllowed(), so
we must call requestLink() before to preserve icp_request.

src/icp_v2.cc

index f6d2eb5b70e66d776ea853e3b6d59f8fb3e8ca9a..d0ca684efd84ca1faec30cdb93100cd224f3ee2c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v2.cc,v 1.85 2005/04/18 21:52:42 hno Exp $
+ * $Id: icp_v2.cc,v 1.86 2005/06/05 15:12:46 serassio Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -447,10 +447,12 @@ doV2Query(int fd, struct sockaddr_in from, char *buf, icp_common_t header)
     if (!icp_request)
         return;
 
+    requestLink(icp_request);
+
     if (!icpAccessAllowed(&from, icp_request))
     {
         icpDenyAccess(&from, url, header.reqnum, fd);
-        requestDestroy(icp_request);
+        requestUnlink(icp_request);
         return;
     }
 
@@ -480,6 +482,8 @@ doV2Query(int fd, struct sockaddr_in from, char *buf, icp_common_t header)
     state->src_rtt = src_rtt;
 
     StoreEntry::getPublic (state, url, METHOD_GET);
+
+    requestUnlink(icp_request);
 }
 
 void