summaryrefslogtreecommitdiffstats
path: root/libxtables
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-06-02 11:04:30 +0200
committerPhil Sutter <phil@nwl.cc>2021-06-07 14:50:27 +0200
commitffe88f8f01263687e82ef4d3d2bdc0cb5444711e (patch)
tree51fe7027282b74ad88a0648ed49e7e9fe3b189ae /libxtables
parent8bb5bcae57c83066c224efa5fd29ed4822a766fc (diff)
libxtables: Fix memleak in xtopt_parse_hostmask()
The allocated hostmask duplicate needs to be freed again. Fixes: 66266abd17adc ("libxtables: XTTYPE_HOSTMASK support") Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'libxtables')
-rw-r--r--libxtables/xtoptions.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libxtables/xtoptions.c b/libxtables/xtoptions.c
index d329f2ff..0dcdf607 100644
--- a/libxtables/xtoptions.c
+++ b/libxtables/xtoptions.c
@@ -763,6 +763,7 @@ static void xtopt_parse_hostmask(struct xt_option_call *cb)
cb->arg = p;
xtopt_parse_plenmask(cb);
cb->arg = orig_arg;
+ free(work);
}
static void xtopt_parse_ethermac(struct xt_option_call *cb)