From: adrian <> Date: Fri, 12 Jan 2001 05:20:45 +0000 (+0000) Subject: Call aclChecklistFree() once we've done with the ACL. This means we don't X-Git-Tag: SQUID_3_0_PRE1~1646 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9b1e111982138d4a5fec34ba32767f566bbb5e0;p=thirdparty%2Fsquid.git Call aclChecklistFree() once we've done with the ACL. This means we don't leak various bits and pieces. --- diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index c424691e66..480f130124 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeaderTools.cc,v 1.28 2001/01/04 21:09:00 wessels Exp $ + * $Id: HttpHeaderTools.cc,v 1.29 2001/01/11 22:20:45 adrian Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov @@ -399,22 +399,27 @@ httpHeaderStrCmp(const char *h1, const char *h2, int len) int httpHdrMangle(HttpHeaderEntry * e, request_t * request) { + int retval; + /* check with anonymizer tables */ header_mangler *hm; aclCheck_t *checklist; assert(e); hm = &Config.header_access[e->id]; - checklist = aclChecklistCreate(hm->access_list, - request, NULL); + checklist = aclChecklistCreate(hm->access_list, request, NULL); /* aclCheckFast returns 1 for allow. */ if (1 == aclCheckFast(hm->access_list, checklist)) - return 1; + retval = 1; /* It was denied; Do we replace it with something else? */ - if (NULL == hm->replacement) - return 0; + else if (NULL == hm->replacement) + retval = 0; /* yes, we do */ - stringReset(&e->value, hm->replacement); - return 1; + else + stringReset(&e->value, hm->replacement); + retval = 1; + + aclChecklistFree(checklist); + return retval; } /* Mangles headers for a list of headers. */