]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/ipproto: Add init/release functions
authorJeff Lucovsky <jeff@lucovsky.org>
Thu, 17 Feb 2022 16:05:22 +0000 (11:05 -0500)
committerShivani Bhardwaj <shivanib134@gmail.com>
Tue, 8 Mar 2022 15:04:15 +0000 (20:34 +0530)
Issue: 5072

This commit insures that the protocol name hashtables are initialized
and released.

(cherry picked from commit b52496725771c0a4bc98e1fe5c246bca77e8da03)

src/suricata.c

index 8e2c00a03a10f776bfd1be1cd98219c961dd12f9..42adee2dacf1336e0d2c4b9e3a835bdbb496b056 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2021 Open Information Security Foundation
+/* Copyright (C) 2007-2022 Open Information Security Foundation
  *
  * You can copy, redistribute or modify this Program under the terms of
  * the GNU General Public License version 2 as published by the Free
@@ -320,6 +320,7 @@ void GlobalsInitPreConfig(void)
     TimeInit();
     SupportFastPatternForSigMatchTypes();
     SCThresholdConfGlobalInit();
+    SCProtoNameInit();
 }
 
 static void GlobalsDestroy(SCInstance *suri)
@@ -346,6 +347,7 @@ static void GlobalsDestroy(SCInstance *suri)
     LiveDeviceListClean();
     OutputDeregisterAll();
     FeatureTrackingRelease();
+    SCProtoNameRelease();
     TimeDeinit();
     if (!suri->disabled_detect) {
         SCReferenceConfDeinit();