]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/MessageDelayPools.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / MessageDelayPools.cc
index 36d9640b7cee9c50df58c4cc7eabdddfb7cb3f9d..35ecc9457f27fd3167ee38211d543f8f87675416 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -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,