DetectEngineCtxFree() cleanup, also in main

remotes/origin/HEAD
Anoop Saldanha 13 years ago committed by Victor Julien
parent c3eab5cf4e
commit eee33866df

@ -227,8 +227,9 @@ static void *DetectEngineLiveRuleSwap(void *arg)
}
SCLogDebug("swapping new det_ctx - %p with older one - %p", det_ctx,
SC_ATOMIC_GET(slots->slot_data));
SC_ATOMIC_SET(slots->slot_data, det_ctx);
SCLogDebug("swapping new det_ctx with older one");
slots = slots->slot_next;
}
@ -418,6 +419,10 @@ void DetectEngineCtxFree(DetectEngineCtx *de_ctx) {
SigGroupCleanup(de_ctx);
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
MpmFactoryDeRegisterAllMpmCtxProfiles(de_ctx);
}
SCFree(de_ctx);
//DetectAddressGroupPrintMemory();
//DetectSigGroupPrintMemory();

@ -1926,10 +1926,6 @@ int main(int argc, char **argv)
"shutdown phase just before the call to SigGroupCleanup()");
}
}
#endif
/* updated by AS. Don't clean up de_ctx. Necessiated by live rule swap */
#if 0
SigGroupCleanup(de_ctx);
#endif
#ifdef __SC_CUDA_SUPPORT__
if (PatternMatchDefaultMatcher() == MPM_B2G_CUDA) {
@ -1945,13 +1941,6 @@ int main(int argc, char **argv)
AppLayerHtpPrintStats();
/* updated by AS. Don't clean up de_ctx. Necessiated by live rule swap */
#if 0
SigCleanSignatures(de_ctx);
#endif
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
MpmFactoryDeRegisterAllMpmCtxProfiles(de_ctx);
}
/* updated by AS. Don't clean up de_ctx. Necessiated by live rule swap */
#if 0
DetectEngineCtxFree(de_ctx);

Loading…
Cancel
Save