From: Alex Rousskov Date: Tue, 3 Jun 2014 06:48:39 +0000 (-0600) Subject: Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response X-Git-Tag: SQUID_3_4_6~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a7ad9b5fb0df2b3dc155cffc0d3b9c3fcc25290;p=thirdparty%2Fsquid.git Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response --- diff --git a/src/external_acl.cc b/src/external_acl.cc index 88f40809d5..33451377d8 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -1603,14 +1603,16 @@ ExternalACLLookup::LookupDone(void *data, void *result) checklist->extacl_entry = cbdataReference((external_acl_entry *)result); // attach the helper kv-pair to the transaction - if (HttpRequest * req = checklist->request) { - // XXX: we have no access to the transaction / AccessLogEntry so cant SyncNotes(). - // workaround by using anything already set in HttpRequest - // OR use new and rely on a later Sync copying these to AccessLogEntry - if (!req->notes) - req->notes = new NotePairs; - - req->notes->appendNewOnly(&checklist->extacl_entry->notes); + if (checklist->extacl_entry) { + if (HttpRequest * req = checklist->request) { + // XXX: we have no access to the transaction / AccessLogEntry so cant SyncNotes(). + // workaround by using anything already set in HttpRequest + // OR use new and rely on a later Sync copying these to AccessLogEntry + if (!req->notes) + req->notes = new NotePairs; + + req->notes->appendNewOnly(&checklist->extacl_entry->notes); + } } checklist->resumeNonBlockingCheck(ExternalACLLookup::Instance());