WSL2-Linux-Kernel/fs/efivarfs
Matt Fleming 22c2b77f41 fs/efivarfs: Fix double kfree() in error path
Julia reported that we may double free 'name' in efivarfs_callback(),
and that this bug was introduced by commit 0d22f33bc37c ("efi: Don't
use spinlocks for efi vars").

Move one of the kfree()s until after the point at which we know we are
definitely on the success path.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
2016-09-09 16:08:48 +01:00
..
Kconfig fs: Make efivarfs a pseudo filesystem, built by default with EFI 2015-01-05 14:15:58 +00:00
Makefile efivarfs: Move to fs/efivarfs 2013-04-17 13:25:09 +01:00
file.c efivarfs: Make efivarfs_file_ioctl() static 2016-05-07 07:06:13 +02:00
inode.c efi: Don't use spinlocks for efi vars 2016-09-09 16:08:42 +01:00
internal.h efi: Make efivarfs entries immutable by default 2016-02-10 16:25:52 +00:00
super.c fs/efivarfs: Fix double kfree() in error path 2016-09-09 16:08:48 +01:00