From: Piyush Pangtey <gokuvsvegita@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH] nft: Remove memory-leak
Date: Mon, 14 Mar 2016 14:11:53 +0530 [thread overview]
Message-ID: <20160314084153.GA4064@fate> (raw)
Added matching xfree calls in chain_free(), for the chain members 'type' and
'dev'.
Signed-off-by: Piyush Pangtey <gokuvsvegita@gmail.com>
---
src/rule.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/rule.c b/src/rule.c
index 0b78549..85987b9 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -510,6 +510,9 @@ void chain_free(struct chain *chain)
rule_free(rule);
handle_free(&chain->handle);
scope_release(&chain->scope);
+ xfree(chain->type);
+ if (chain->dev != NULL)
+ xfree(chain->dev);
xfree(chain);
}
--
1.9.1
--
With regards,
Piyush Pangtey <gokuvsvegita@gmail.com>
next reply other threads:[~2016-03-14 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 8:41 Piyush Pangtey [this message]
2016-03-15 0:26 ` [PATCH] nft: Remove memory-leak Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160314084153.GA4064@fate \
--to=gokuvsvegita@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).