pfring: clean up decode thread local storage

Clean up the thread local data the decode portion of pfring uses.

Bug #978
pull/914/merge
Victor Julien 11 years ago
parent a8b1af3369
commit 900fc6fdc7

@ -68,6 +68,7 @@ TmEcode ReceivePfringThreadDeinit(ThreadVars *, void *);
TmEcode DecodePfringThreadInit(ThreadVars *, void *, void **);
TmEcode DecodePfring(ThreadVars *, Packet *, void *, PacketQueue *, PacketQueue *);
TmEcode DecodePfringThreadDeinit(ThreadVars *tv, void *data);
extern int max_pending_packets;
extern uint8_t suricata_ctl_flags;
@ -183,7 +184,7 @@ void TmModuleDecodePfringRegister (void) {
tmm_modules[TMM_DECODEPFRING].ThreadInit = DecodePfringThreadInit;
tmm_modules[TMM_DECODEPFRING].Func = DecodePfring;
tmm_modules[TMM_DECODEPFRING].ThreadExitPrintStats = NULL;
tmm_modules[TMM_DECODEPFRING].ThreadDeinit = NULL;
tmm_modules[TMM_DECODEPFRING].ThreadDeinit = DecodePfringThreadDeinit;
tmm_modules[TMM_DECODEPFRING].RegisterTests = NULL;
tmm_modules[TMM_DECODEPFRING].flags = TM_FLAG_DECODE_TM;
}
@ -662,5 +663,14 @@ TmEcode DecodePfringThreadInit(ThreadVars *tv, void *initdata, void **data)
return TM_ECODE_OK;
}
TmEcode DecodePfringThreadDeinit(ThreadVars *tv, void *data)
{
if (data != NULL)
DecodeThreadVarsFree(data);
SCReturnInt(TM_ECODE_OK);
}
#endif /* HAVE_PFRING */
/* eof */

Loading…
Cancel
Save