From: Alex Rousskov Date: Thu, 15 May 2014 07:32:10 +0000 (-0700) Subject: Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response X-Git-Tag: SQUID_3_5_0_1~231 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=243743d84469d75b55ab72c58c60cff5ce69cfe5;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 fb1462992e..d4b81d1689 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -1529,14 +1529,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());