]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 15 May 2014 07:32:10 +0000 (00:32 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 15 May 2014 07:32:10 +0000 (00:32 -0700)
src/external_acl.cc

index fb1462992e618ae2be9c54da53c500f4423c1c64..d4b81d1689581b76d9112303a98ff26986f67aba 100644 (file)
@@ -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());