Skip unsupported statements when building the statement matrix, otherwise clone remains uninitialized. Fixes: fb298877ece2 ("src: add ruleset optimization infrastructure") Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- src/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/optimize.c b/src/optimize.c index a6c26d21eb6b..13890a63e210 100644 --- a/src/optimize.c +++ b/src/optimize.c @@ -274,7 +274,7 @@ static int rule_collect_stmts(struct optimize_ctx *ctx, struct rule *rule) clone->log.prefix = expr_get(stmt->log.prefix); break; default: - break; + continue; } ctx->stmt[ctx->num_stmts++] = clone; -- 2.30.2