From: Amos Jeffries Date: Thu, 23 Feb 2017 10:29:11 +0000 (+1300) Subject: Add missing return statements after self_destruct() X-Git-Tag: M-staged-PR71~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24095690c27efd61100c37e4c7fd7cbee1f214ea;p=thirdparty%2Fsquid.git Add missing return statements after self_destruct() Detected by Coverity Scan. Issue 1364728. --- diff --git a/src/helper/ChildConfig.cc b/src/helper/ChildConfig.cc index 63c3f0d493..c113f7109d 100644 --- a/src/helper/ChildConfig.cc +++ b/src/helper/ChildConfig.cc @@ -73,8 +73,10 @@ Helper::ChildConfig::parseConfig() { char const *token = ConfigParser::NextToken(); - if (!token) + if (!token) { self_destruct(); + return; + } /* starts with a bare number for the max... back-compatible */ n_max = xatoui(token); @@ -82,6 +84,7 @@ Helper::ChildConfig::parseConfig() if (n_max < 1) { debugs(0, DBG_CRITICAL, "ERROR: The maximum number of processes cannot be less than 1."); self_destruct(); + return; } /* Parse extension options */ @@ -108,10 +111,12 @@ Helper::ChildConfig::parseConfig() else { debugs(0, DBG_CRITICAL, "ERROR: Unsupported on-persistent-overloaded action: " << action); self_destruct(); + return; } } else { debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Undefined option: " << token << "."); self_destruct(); + return; } }