[PATCH] powerpc: Fix kobject memleak
Greg Kroah-Hartman
gregkh at linuxfoundation.org
Tue Apr 30 18:42:10 AEST 2019
On Tue, Apr 30, 2019 at 11:09:23AM +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().
>
> Signed-off-by: Tobin C. Harding <tobin at kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
More information about the Linuxppc-dev
mailing list