]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fixed hinkiness
authorCarter Waxman <cwaxman@cisco.com>
Mon, 11 Apr 2016 15:01:45 +0000 (11:01 -0400)
committerCarter Waxman <cwaxman@cisco.com>
Mon, 11 Apr 2016 15:01:45 +0000 (11:01 -0400)
src/network_inspectors/perf_monitor/perf_module.cc

index 263a7be7b605986cb31620addef3b0bd71e4b598..1ff85433c67511d156690aa00f7faadd001d6d39 100644 (file)
@@ -192,7 +192,7 @@ bool PerfMonModule::begin(const char* fqn, int, SnortConfig*)
     return true;
 }
 
-static bool add_module(PerfConfig& config, Module *mod, std::string pegs)
+static bool add_module(PerfConfig& config, Module *mod, std::string& pegs)
 {
     const PegInfo* peg_info;
     std::string tok;
@@ -236,9 +236,11 @@ bool PerfMonModule::end(const char* fqn, int idx, SnortConfig*)
         if ( !config.modules.size() )
         {
             auto modules = ModuleManager::get_all_modules();
+            std::string empty;
+
             for ( auto& mod : modules )
             {
-                if ( !add_module(config, mod, std::string()) )
+                if ( !add_module(config, mod, empty) )
                     return false;
             }
         }