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

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