]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 3 Jun 2014 06:48:39 +0000 (00:48 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 3 Jun 2014 06:48:39 +0000 (00:48 -0600)
src/external_acl.cc

index 88f40809d54bb77c1757903a330e3f67dc0c7ee2..33451377d8fce274a3101c8a14cfe07389c7d1e7 100644 (file)
@@ -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());