* [PATCH] nft: Remove memory-leak
@ 2016-03-14 8:41 Piyush Pangtey
2016-03-15 0:26 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Piyush Pangtey @ 2016-03-14 8:41 UTC (permalink / raw)
To: netfilter-devel
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>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nft: Remove memory-leak
2016-03-14 8:41 [PATCH] nft: Remove memory-leak Piyush Pangtey
@ 2016-03-15 0:26 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2016-03-15 0:26 UTC (permalink / raw)
To: Piyush Pangtey; +Cc: netfilter-devel
On Mon, Mar 14, 2016 at 02:11:53PM +0530, Piyush Pangtey wrote:
> Added matching xfree calls in chain_free(), for the chain members 'type' and
> 'dev'.
Please, reintroduce the valgrind message for the record.
It would be good too if you add to the descriptions the nft command you
use to trigger the valgrind leak reports.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-15 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-14 8:41 [PATCH] nft: Remove memory-leak Piyush Pangtey
2016-03-15 0:26 ` Pablo Neira Ayuso
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).