runmodes: fix memleak

active_runmode value was leaking in unix socket mode.
pull/1910/head
Eric Leblond 10 years ago
parent b1f907a58f
commit cc942b4fb8

@ -360,6 +360,9 @@ void RunModeDispatch(int runmode, const char *custom_mode)
}
/* Export the custom mode */
if (active_runmode) {
SCFree(active_runmode);
}
active_runmode = SCStrdup(custom_mode);
if (unlikely(active_runmode == NULL)) {
SCLogError(SC_ERR_MEM_ALLOC, "Unable to dup active mode");

Loading…
Cancel
Save