powerpc/nvram: Fix a memory leak in err path
Michael Ellerman
patch-notifications at ellerman.id.au
Tue Sep 20 23:07:19 AEST 2016
On Wed, 2015-09-12 at 10:00:53 UTC, xinhui wrote:
> If kmemdup fails, We need kfree *buff* first then return -ENOMEM.
> Otherwise there is a memory leak.
>
> Signed-off-by: Pan Xinhui <xinhui.pan at linux.vnet.ibm.com>
> Reviewed-by: Nathan Fontenot <nfont at linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/0d0fecc5b5bfddb0e67bef985c
cheers
More information about the Linuxppc-dev
mailing list