]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix possible NULL-dereference handling annotations
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 11 Nov 2013 11:24:23 +0000 (04:24 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 11 Nov 2013 11:24:23 +0000 (04:24 -0700)
  Detected by Coverity Scan. Issue 1127088

src/auth/UserRequest.cc

index d6b6bf1cab2bce6323d2208a6c59a54ae22354de..d4bf5e64527cfdbdd83acb125267b101a2616f04 100644 (file)
@@ -258,7 +258,7 @@ authTryGetUser(Auth::UserRequest::Pointer auth_user_request, ConnStateData * con
         res = conn->getAuth();
 
     // attach the credential notes from helper to the transaction
-    if (res != NULL && res->user() != NULL) {
+    if (request != NULL && res != NULL && res->user() != NULL) {
         // 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