diff options
author | Phil Sutter <phil@nwl.cc> | 2019-12-02 23:00:20 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2019-12-03 18:34:35 +0100 |
commit | 32a8c5f52355ef69bf74c28e27345b2e03d948e7 (patch) | |
tree | aeced2323713885abbe2f42d7553ec8a7f329aa3 /src/chain.c | |
parent | ba1b02594e8d05e4c791925a50f9309f89b55c80 (diff) |
chain: Fix memleak in error path of nftnl_chain_parse_devs()
In error case, dev_array is not freed when it should.
Fixes: e3ac19b5ec162 ("chain: multi-device support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/chain.c')
-rw-r--r-- | src/chain.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/chain.c b/src/chain.c index d4050d2..9cc8735 100644 --- a/src/chain.c +++ b/src/chain.c @@ -636,6 +636,7 @@ static int nftnl_chain_parse_devs(struct nlattr *nest, struct nftnl_chain *c) err: while (len--) xfree(dev_array[len]); + xfree(dev_array); return -1; } |