profiling: don't init rule profiling ctx if rule profiling is disabled

pull/638/head
Victor Julien 11 years ago
parent 660636c5bc
commit 8ffa30dd88

@ -526,6 +526,9 @@ void SCProfilingRuleThreadCleanup(DetectEngineThreadCtx *det_ctx) {
void
SCProfilingRuleInitCounters(DetectEngineCtx *de_ctx)
{
if (profiling_rules_enabled == 0)
return;
de_ctx->profile_ctx = SCProfilingRuleInitCtx();
BUG_ON(de_ctx->profile_ctx == NULL);

Loading…
Cancel
Save