Re: [PATCH] cpufreq: Fix kobject memleak

From: Tobin C. Harding
Date: Tue Apr 30 2019 - 02:34:11 EST


On Tue, Apr 30, 2019 at 11:35:52AM +0530, Viresh Kumar wrote:
> Currently the error return path from kobject_init_and_add() is not
> followed by a call to kobject_put() - which means we are leaking the
> kobject.
>
> Fix it by adding a call to kobject_put() in the error path of
> kobject_init_and_add().
>
> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> ---
> Tobin fixed this for schedutil already.

For what its worth:

Reviewed-by: Tobin C. Harding <tobin@xxxxxxxxxx>

Thanks Viresh, one less for me to do!

Tobin