From 99afd62d48f4c510bdb4076eb9d811c001ad1cac Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 23 Apr 2019 13:18:05 +0200 Subject: src: fix double free on xt stmt destruction 'nft monitor' dies with: *** Error in `/sbin/nft': double free or corruption (fasttop): 0x000055f8ba57b750 *** ... when the iptables-nft test suite is running in parallel, because xfree(stmt->xt.name) gets called twice. Fixes: 4ac11b890fe870 ("src: missing destroy function in statement definitions") Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- src/statement.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/statement.c') diff --git a/src/statement.c b/src/statement.c index b2370f87..7f9c10b3 100644 --- a/src/statement.c +++ b/src/statement.c @@ -866,12 +866,6 @@ static void xt_stmt_print(const struct stmt *stmt, struct output_ctx *octx) xt_stmt_xlate(stmt, octx); } -static void xt_stmt_destroy(struct stmt *stmt) -{ - xfree(stmt->xt.name); - xt_stmt_release(stmt); -} - static const struct stmt_ops xt_stmt_ops = { .type = STMT_XT, .name = "xt", -- cgit v1.2.3