From 319bf5a7e81f880a80070652c9762d88497e9aa1 Mon Sep 17 00:00:00 2001 From: serassio <> Date: Sun, 5 Jun 2005 21:12:46 +0000 Subject: [PATCH] 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. --- src/icp_v2.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.47.3