Blame SOURCES/0003-chain-Fix-memleak-in-error-path-of-nftnl_chain_parse.patch

e61c3f
From a5241b8fcd2f62d8e71bf9dfebfbcf27a8a61e46 Mon Sep 17 00:00:00 2001
e61c3f
From: Phil Sutter <psutter@redhat.com>
e61c3f
Date: Fri, 6 Dec 2019 17:31:16 +0100
e61c3f
Subject: [PATCH] chain: Fix memleak in error path of nftnl_chain_parse_devs()
e61c3f
e61c3f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1778952
e61c3f
Upstream Status: libnftnl commit 32a8c5f52355e
e61c3f
e61c3f
commit 32a8c5f52355ef69bf74c28e27345b2e03d948e7
e61c3f
Author: Phil Sutter <phil@nwl.cc>
e61c3f
Date:   Mon Dec 2 23:00:20 2019 +0100
e61c3f
e61c3f
    chain: Fix memleak in error path of nftnl_chain_parse_devs()
e61c3f
e61c3f
    In error case, dev_array is not freed when it should.
e61c3f
e61c3f
    Fixes: e3ac19b5ec162 ("chain: multi-device support")
e61c3f
    Signed-off-by: Phil Sutter <phil@nwl.cc>
e61c3f
    Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
e61c3f
---
e61c3f
 src/chain.c | 1 +
e61c3f
 1 file changed, 1 insertion(+)
e61c3f
e61c3f
diff --git a/src/chain.c b/src/chain.c
e61c3f
index d4050d2..9cc8735 100644
e61c3f
--- a/src/chain.c
e61c3f
+++ b/src/chain.c
e61c3f
@@ -636,6 +636,7 @@ static int nftnl_chain_parse_devs(struct nlattr *nest, struct nftnl_chain *c)
e61c3f
 err:
e61c3f
 	while (len--)
e61c3f
 		xfree(dev_array[len]);
e61c3f
+	xfree(dev_array);
e61c3f
 	return -1;
e61c3f
 }
e61c3f
 
e61c3f
-- 
e61c3f
1.8.3.1
e61c3f