--------------------- PatchSet 1934 Date: 2005/10/05 17:46:57 Author: rousskov Branch: squid3-icap Tag: (none) Log: - Added a note that icap_access_check is not leaking here and will delete self. - Set icapAccessCheckPending before the call to check() in case the latter "calls us back" earlier than we expected. We should probably close the context earlier too, for the same reason. - Do not imply new() can return a null pointer. - Made icap_access_check variable local to the surrounding #ifdefs. Members: src/http.cc:1.49.2.44->1.49.2.45 Index: squid3/src/http.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/http.cc,v retrieving revision 1.49.2.44 retrieving revision 1.49.2.45 diff -u -r1.49.2.44 -r1.49.2.45 --- squid3/src/http.cc 3 Oct 2005 23:28:43 -0000 1.49.2.44 +++ squid3/src/http.cc 5 Oct 2005 17:46:57 -0000 1.49.2.45 @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.49.2.44 2005/10/03 23:28:43 dwsquid Exp $ + * $Id: http.cc,v 1.49.2.45 2005/10/05 17:46:57 rousskov Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -752,15 +752,15 @@ #if ICAP_CLIENT - ICAPAccessCheck *icap_access_check; + { + ICAPAccessCheck *icap_access_check = + new ICAPAccessCheck(ICAPServiceRep::respmod, ICAPServiceRep::precache, request, reply, icapAclCheckDoneWrapper, this); - if (icap_access_check = new ICAPAccessCheck(ICAPServiceRep::respmod, ICAPServiceRep::precache, request, reply, icapAclCheckDoneWrapper, this)) { - icap_access_check->check(); icapAccessCheckPending = true; + icap_access_check->check(); // will eventually delete self ctx_exit(ctx); return; } - #endif storeEntryReplaceObject(entry, reply);