Remove free operation on thread name field.

Name field is now  a pre-allocated array - free is no longer necessary.
Fix issue leading to segfault during interface shortening in Single runmode.
pull/2050/head
Zachary Rasmor 9 years ago committed by Victor Julien
parent 71018cd2ce
commit dbbca37a94

@ -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);
}

@ -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);
}

Loading…
Cancel
Save