]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add missing return statements after self_destruct()
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Feb 2017 10:36:00 +0000 (23:36 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Feb 2017 10:36:00 +0000 (23:36 +1300)
 Detected by Coverity Scan. Issue 1401397

src/MessageDelayPools.cc

index 36d9640b7cee9c50df58c4cc7eabdddfb7cb3f9d..65b8a2584adec78e9c50059b82988d0a46c928e5 100644 (file)
@@ -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,