profiling: don't alloc 0 bytes block if no rules are used

pull/559/head
Victor Julien 12 years ago
parent 468a8e1ca3
commit eca1a8d73a

@ -477,7 +477,7 @@ void SCProfilingRuleDestroyCtx(SCProfileDetectCtx *ctx) {
}
void SCProfilingRuleThreadSetup(SCProfileDetectCtx *ctx, DetectEngineThreadCtx *det_ctx) {
if (ctx == NULL)
if (ctx == NULL|| ctx->size == 0)
return;
SCProfileData *a = SCMalloc(sizeof(SCProfileData) * ctx->size);

Loading…
Cancel
Save