diff options
author | Phil Sutter <phil@nwl.cc> | 2024-01-31 21:40:19 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-02-01 14:51:30 +0100 |
commit | d109e41344b8f54741c0862a44d544a713178dd3 (patch) | |
tree | 5990f301d536ff6977aa5be83c9f32889fcf2177 /iptables/xshared.h | |
parent | 933e605154c439218f73f48b028abbeed336c3c5 (diff) |
xshared: Introduce xtables_clear_args()
Perform struct xtables_args object deinit in a common place, even though
it merely consists of freeing any IP addresses and masks.
This fixes for a memleak in arptables-translate as the check for
h->family didn't catch the value NFPROTO_ARP.
Fixes: 5b7324e0675e3 ("nft-arp: add arptables-translate")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.h')
-rw-r--r-- | iptables/xshared.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/iptables/xshared.h b/iptables/xshared.h index 2a9cdf45..7d4035ec 100644 --- a/iptables/xshared.h +++ b/iptables/xshared.h @@ -333,4 +333,6 @@ unsigned char *make_delete_mask(const struct xtables_rule_match *matches, void iface_to_mask(const char *ifname, unsigned char *mask); +void xtables_clear_args(struct xtables_args *args); + #endif /* IPTABLES_XSHARED_H */ |