Skip to content
Commit 0d0fecc5 authored by Pan Xinhui's avatar Pan Xinhui Committed by Michael Ellerman
Browse files

powerpc/nvram: Fix a memory leak in err path



If kmemdup fails, We need kfree *buff* first then return -ENOMEM.
Otherwise there is a memory leak.

Signed-off-by: default avatarPan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Reviewed-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 49d09bf2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment