From: Russ Combs Date: Thu, 10 Jul 2014 21:40:44 +0000 (-0400) Subject: fixed --help* segfault caused by service mapping changes X-Git-Tag: 3.0.0-233~1444^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c27a816f656364d48e7eec914e9d1dc8ea678442;p=thirdparty%2Fsnort3.git fixed --help* segfault caused by service mapping changes --- diff --git a/src/framework/inspector.h b/src/framework/inspector.h index e7350f393..1973d2451 100644 --- a/src/framework/inspector.h +++ b/src/framework/inspector.h @@ -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 diff --git a/src/parser/cmd_line.cc b/src/parser/cmd_line.cc index d7b7a99d8..ea6de8a2e 100644 --- a/src/parser/cmd_line.cc +++ b/src/parser/cmd_line.cc @@ -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); }