Patchwork [2/2] nft: mem leak in nft_rule_list_cb

login
register
mail settings
Submitter Giuseppe Longo
Date June 25, 2013, 7:46 a.m.
Message ID <20130625074617.4665.91288.stgit@localhost>
Download mbox | patch
Permalink /patch/254049/
State Accepted
Headers show

Comments

Giuseppe Longo - June 25, 2013, 7:46 a.m.
Memory leak in function nft_rule_list_cb fixed.

Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
---
 iptables/nft.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira - June 25, 2013, 10 a.m.
On Tue, Jun 25, 2013 at 09:46:17AM +0200, Giuseppe Longo wrote:
> Memory leak in function nft_rule_list_cb fixed.

Applied, thanks Giuseppe.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/iptables/nft.c b/iptables/nft.c
index 680b2f0..98d602c 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -1140,6 +1140,7 @@  static int nft_rule_list_cb(const struct nlmsghdr *nlh, void *data)
 	return MNL_CB_OK;
 out:
 	nft_rule_free(r);
+	nft_rule_list_free(list);
 err:
 	return MNL_CB_OK;
 }