]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fixed --help* segfault caused by service mapping changes
authorRuss Combs <rucombs@cisco.com>
Thu, 10 Jul 2014 21:40:44 +0000 (17:40 -0400)
committerRuss Combs <rucombs@cisco.com>
Thu, 10 Jul 2014 21:40:44 +0000 (17:40 -0400)
src/framework/inspector.h
src/parser/cmd_line.cc

index e7350f393011401dc858bd11a2d4d9bf1be21ae5..1973d2451d3c6ac04005c4bf27186f3536d8cbf7 100644 (file)
@@ -143,7 +143,6 @@ struct InspectApi
 
     const char** buffers;  // null terminated list of exported buffers
     const char* service;   // nullptr when type != IT_SERVICE
-    //ServiceTag tags;     // null terminated list of tags
 
     // main thread funcs - parse time data only
     InspectFunc init;      // allocate process static data
index d7b7a99d887a48b81cf503a0b4012e1bb25c7f07..ea6de8a2e39ba10d358d711cd37bb57ac91ef839 100644 (file)
@@ -261,6 +261,7 @@ enum HelpType { HT_CFG, HT_CMD, HT_GID, HT_IPS, HT_MOD, HT_BUF };
 
 static void show_help(SnortConfig* sc, const char* val, HelpType ht)
 {
+    snort_conf = new SnortConfig;
     PluginManager::load_plugins(sc->plugin_path);
     ModuleManager::init();
 
@@ -289,6 +290,7 @@ static void show_help(SnortConfig* sc, const char* val, HelpType ht)
     }
     ModuleManager::term();
     PluginManager::release_plugins();
+    delete snort_conf;
     exit(0);
 }