From: Phil Sutter Date: Wed, 2 Jun 2021 09:04:30 +0000 (+0200) Subject: libxtables: Fix memleak in xtopt_parse_hostmask() X-Git-Tag: v1.8.8~158 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffe88f8f01263687e82ef4d3d2bdc0cb5444711e;p=thirdparty%2Fiptables.git 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 --- 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)