nft: Remove memory-leak
PATCH 1/1 nft: Remove memory-leak
Added matching xfree calls in chain_free(), for the chain members 'type' and 'dev'.
Signed-off-by Piyush Pangtey <[email protected]>
--- src/rule.c | 3 +++ 1 file changed, 3 insertions(+)
src/rule.c +3 -0
@@ -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); }
Signature · 7 lines
1.9.1 -- With regards, Piyush Pangtey <[email protected]>
Pablo Neira Ayuso
maintainerQuoted 2 lines · Piyush Pangtey
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.