From: Amos Jeffries Date: Thu, 23 Feb 2017 10:36:00 +0000 (+1300) Subject: Add missing return statements after self_destruct() X-Git-Tag: M-staged-PR71~247 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=941bcba7fa684d1632c1af5e263b121f432df305;p=thirdparty%2Fsquid.git Add missing return statements after self_destruct() Detected by Coverity Scan. Issue 1401397 --- diff --git a/src/MessageDelayPools.cc b/src/MessageDelayPools.cc index 36d9640b7c..65b8a2584a 100644 --- a/src/MessageDelayPools.cc +++ b/src/MessageDelayPools.cc @@ -133,6 +133,7 @@ MessageDelayConfig::parseResponseDelayPool() if (name.isEmpty()) { debugs(3, DBG_CRITICAL, "FATAL: response_delay_pool missing required \"name\" parameter."); self_destruct(); + return; } char *key = nullptr; @@ -141,11 +142,13 @@ MessageDelayConfig::parseResponseDelayPool() if (!value) { debugs(3, DBG_CRITICAL, "FATAL: '" << key << "' option missing value"); self_destruct(); + return; } auto it = params.find(SBuf(key)); if (it == params.end()) { debugs(3, DBG_CRITICAL, "FATAL: response_delay_pool unknown option '" << key << "'"); self_destruct(); + return; } it->second = (it->first == initialBucketPercent) ? xatos(value) : xatoll(value, 10); } @@ -159,6 +162,7 @@ MessageDelayConfig::parseResponseDelayPool() if (fatalMsg) { debugs(3, DBG_CRITICAL, "FATAL: must use " << fatalMsg << " options in conjunction"); self_destruct(); + return; } MessageDelayPool *pool = new MessageDelayPool(name,