From: Amos Jeffries Date: Wed, 15 Jan 2014 01:54:19 +0000 (+1300) Subject: Cleanup: ICAP adaptation pointer handling X-Git-Tag: SQUID_3_5_0_1~413 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1466f20190288bd42f07c311e8f5421a8c2a877;p=thirdparty%2Fsquid.git Cleanup: ICAP adaptation pointer handling Divert unlikely but possible request NULL pointer into the Must() condition handler for missing History data. Detected by Coverity Scan. Issue 740365. --- diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index ec79378562..dbe94b3725 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -1262,7 +1262,7 @@ void Adaptation::Icap::ModXact::finalizeLogInfo() reply_ = dynamic_cast(adapted.header); } - Adaptation::Icap::History::Pointer h = request_->icapHistory(); + Adaptation::Icap::History::Pointer h = (request_ ? request_->icapHistory() : NULL); Must(h != NULL); // ICAPXaction::maybeLog calls only if there is a log al.icp.opcode = ICP_INVALID; al.url = h->log_uri.termedBuf();