powerpc/nvram: Add missing kfree in error path
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Fri, 17 Jul 2015 07:19:59 +0000 (09:19 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Oct 2015 12:54:55 +0000 (22:54 +1000)
commit7d523187173294f6ae3b86a48e442122b1aecc38
tree2446488fa1dc54398b339fde49912352c60d8f4b
parent2adc48a691866fbb3134dd3abd77647a8b5a9307
powerpc/nvram: Add missing kfree in error path

If 'nvram_write_header' fails, then 'new_part' should be freed, otherwise,
there is a memory leak.

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/nvram_64.c