Re: [PATCH nf] netfilter: fix memory leaks on netlink_dump_start error

2018-08-16 Thread Pablo Neira Ayuso
On Tue, Jul 31, 2018 at 01:41:23PM +0200, Florian Westphal wrote: > Shaochun Chen points out we leak dumper filter state allocations > stored in dump_control->data in case there is an error before netlink sets > cb_running (after which ->done will be called at some point). > > In order to fix this

[PATCH nf] netfilter: fix memory leaks on netlink_dump_start error

2018-07-31 Thread Florian Westphal
Shaochun Chen points out we leak dumper filter state allocations stored in dump_control->data in case there is an error before netlink sets cb_running (after which ->done will be called at some point). In order to fix this, add .start functions and move allocations there. Same pattern as used in