diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-06-01 10:14:22 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-06-01 10:35:16 +0200 |
commit | 59bd944f6d75e99fe0c8d743e7fd482672640c2d (patch) | |
tree | d2700e3bb28001352f801c698803772470516970 /src | |
parent | 87fdf683fb5aec51ce8c399aa28a0db0d2adb69a (diff) |
optimize: segfault when releasing unsupported statement
Call xfree() instead since stmt_alloc() does not initialize the
statement type fields.
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1609
Fixes: ea1f1c9ff608 ("optimize: memleak in statement matrix")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/optimize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/optimize.c b/src/optimize.c index d6dfffec..3a3049d4 100644 --- a/src/optimize.c +++ b/src/optimize.c @@ -304,7 +304,7 @@ static int rule_collect_stmts(struct optimize_ctx *ctx, struct rule *rule) clone->nat.type_flags = stmt->nat.type_flags; break; default: - stmt_free(clone); + xfree(clone); continue; } |