Re: [PATCH 3/3] net-sysfs: Fix error path for kobject_init_and_add()
From: Andy Shevchenko
Date: Tue Apr 30 2019 - 12:11:37 EST
On Tue, Apr 30, 2019 at 10:28:17AM +1000, Tobin C. Harding wrote:
> Currently error return from kobject_init_and_add() is not followed by a
> call to kobject_put(). This means there is a memory leak.
>
> Add call to kobject_put() in error path of kobject_init_and_add().
It's not obvious to me if this will help to fix what is stated in the
(reverted) commit 6b70fc94afd1 ("net-sysfs: Fix memory leak in
netdev_register_kobject")?
If so, perhaps we need to tell syzkaller guys about this.
--
With Best Regards,
Andy Shevchenko