As a mirror of DecodeThreadVarsAlloc, DecodeThreadVarsFree is used
to free the memory that DecodeThreadVarsAlloc alloc'd, including
AppLayer storage.
return dtv;
}
+void DecodeThreadVarsFree(DecodeThreadVars *dtv)
+{
+ if (dtv != NULL) {
+ if (dtv->app_tctx != NULL)
+ AppLayerDestroyCtxThread(dtv->app_tctx);
+ SCFree(dtv);
+ }
+}
+
/**
* \brief Set data for Packet and set length when zeo copy is used
*
const char *PktSrcToString(enum PktSrcEnum pkt_src);
DecodeThreadVars *DecodeThreadVarsAlloc(ThreadVars *);
+void DecodeThreadVarsFree(DecodeThreadVars *);
/* decoder functions */
int DecodeEthernet(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, PacketQueue *);