diff --git a/src/tm-threads.c b/src/tm-threads.c index 4fbc54a2e2..b21770e4ea 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -1777,9 +1777,6 @@ void TmThreadFree(ThreadVars *tv) TmThreadDeinitMC(tv); - if (tv->name) { - SCFree(tv->name); - } if (tv->thread_group_name) { SCFree(tv->thread_group_name); } diff --git a/src/util-runmodes.c b/src/util-runmodes.c index 03ec2ba293..13724e98fe 100644 --- a/src/util-runmodes.c +++ b/src/util-runmodes.c @@ -442,6 +442,7 @@ int RunModeSetLiveCaptureSingle(ConfigIfaceParserFunc ConfigParser, const char *live_dev) { int nlive = LiveGetDeviceCount(); + const char *live_dev_c = NULL; void *aconf; if (nlive > 1) { @@ -452,8 +453,9 @@ int RunModeSetLiveCaptureSingle(ConfigIfaceParserFunc ConfigParser, if (live_dev != NULL) { aconf = ConfigParser(live_dev); + live_dev_c = live_dev; } else { - const char *live_dev_c = LiveGetDeviceName(0); + live_dev_c = LiveGetDeviceName(0); aconf = ConfigParser(live_dev_c); /* \todo Set threads number in config to 1 */ } @@ -463,7 +465,7 @@ int RunModeSetLiveCaptureSingle(ConfigIfaceParserFunc ConfigParser, recv_mod_name, decode_mod_name, thread_name, - live_dev, + live_dev_c, aconf, 1); }