detect-engine-analyzer: set EngineAnalysisCtx to NULL after free'ing

when engine-analysis is turned off in suricata.yaml
and we run suricata with --engine-analysis
suricata will try to use data from de_ctx->ea wich is
free'd in SetupEngineAnalysis() because fp_analysis and
rule_analysis is turned off and will receive SIGSEGV
with something like:
0x00007ffff7b4ac7b in _IO_new_fclose (fp=0xad96ab1cf5b38042) at ./libio/iofclose.c:48

Ticket: 8505
pull/15344/head
Sergey Pinaev 4 months ago committed by Victor Julien
parent 8968b1c5a1
commit 42fbc55aac

@ -506,6 +506,7 @@ void SetupEngineAnalysis(DetectEngineCtx *de_ctx, bool *fp_analysis, bool *rule_
if (ea->analyzer_items)
SCFree(ea->analyzer_items);
SCFree(ea);
de_ctx->ea = NULL;
}
}

Loading…
Cancel
Save