summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-eb.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-03-14 22:36:50 +0100
committerFlorian Westphal <fw@strlen.de>2023-03-14 22:39:15 +0100
commite900d40afdb731d2270a5110833ae49192974355 (patch)
treeeab02ca3a937ad49961af9afc7c6a7950e1664b6 /iptables/xtables-eb.c
parent5fd85822bd12a02f1a921243f605fc6238d705b4 (diff)
xtables-eb: fix crash when opts isn't reallocated
opts may point to statically allocated memory. This fixes abort() from libc. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables-eb.c')
-rw-r--r--iptables/xtables-eb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 3a73e797..068dffd2 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -675,7 +675,8 @@ void nft_fini_eb(struct nft_handle *h)
free(target->t);
}
- free(opts);
+ if (opts != ebt_original_options)
+ free(opts);
nft_fini(h);
xtables_fini();