[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200612123109.GA22179@splinter>
Date: Fri, 12 Jun 2020 15:31:09 +0300
From: Ido Schimmel <idosch@...sch.org>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [Patch net] genetlink: clean up family attributes allocations
On Fri, Jun 12, 2020 at 12:16:55AM -0700, Cong Wang wrote:
> genl_family_rcv_msg_attrs_parse() and genl_family_rcv_msg_attrs_free()
> take a boolean parameter to determine whether allocate/free the family
> attrs. This is unnecessary as we can just check family->parallel_ops.
> More importantly, callers would not need to worry about pairing these
> parameters correctly after this patch.
>
> And this fixes a memory leak, as after commit c36f05559104
> ("genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()")
> we call genl_family_rcv_msg_attrs_parse() for both parallel and
> non-parallel cases.
>
> Fixes: c36f05559104 ("genetlink: fix memory leaks in genl_family_rcv_msg_dumpit()")
> Reported-by: Ido Schimmel <idosch@...sch.org>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Reviewed-by: Ido Schimmel <idosch@...lanox.com>
Tested-by: Ido Schimmel <idosch@...lanox.com>
Thanks!
Powered by blists - more mailing lists