Blame SOURCES/0007-libxtables-Fix-memleak-in-xtopt_parse_hostmask.patch

087bff
From eece041510effa3359135f92714cfa4012bd8922 Mon Sep 17 00:00:00 2001
087bff
From: Phil Sutter <phil@nwl.cc>
087bff
Date: Wed, 2 Jun 2021 11:04:30 +0200
087bff
Subject: [PATCH] libxtables: Fix memleak in xtopt_parse_hostmask()
087bff
087bff
The allocated hostmask duplicate needs to be freed again.
087bff
087bff
Fixes: 66266abd17adc ("libxtables: XTTYPE_HOSTMASK support")
087bff
Signed-off-by: Phil Sutter <phil@nwl.cc>
087bff
(cherry picked from commit ffe88f8f01263687e82ef4d3d2bdc0cb5444711e)
087bff
---
087bff
 libxtables/xtoptions.c | 1 +
087bff
 1 file changed, 1 insertion(+)
087bff
087bff
diff --git a/libxtables/xtoptions.c b/libxtables/xtoptions.c
087bff
index d329f2ff7979e..0dcdf607f4678 100644
087bff
--- a/libxtables/xtoptions.c
087bff
+++ b/libxtables/xtoptions.c
087bff
@@ -763,6 +763,7 @@ static void xtopt_parse_hostmask(struct xt_option_call *cb)
087bff
 	cb->arg = p;
087bff
 	xtopt_parse_plenmask(cb);
087bff
 	cb->arg = orig_arg;
087bff
+	free(work);
087bff
 }
087bff
 
087bff
 static void xtopt_parse_ethermac(struct xt_option_call *cb)
087bff
-- 
087bff
2.31.1
087bff