From: serassio <> Date: Sun, 5 Jun 2005 21:12:46 +0000 (+0000) Subject: Bug #829: icp denied query causes squid to fail assert src/HttpHeader.cc:374 X-Git-Tag: SQUID_3_0_PRE4~731 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=319bf5a7e81f880a80070652c9762d88497e9aa1;p=thirdparty%2Fsquid.git Bug #829: icp denied query causes squid to fail assert src/HttpHeader.cc:374 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. --- diff --git a/src/icp_v2.cc b/src/icp_v2.cc index f6d2eb5b70..d0ca684efd 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -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