linux/drivers/firmware/google
Christophe JAILLET 9434cec130 firmware: Google VPD: Fix memory allocation error handling
This patch fixes several issues:
   - if the 1st 'kzalloc' fails, we dereference a NULL pointer
   - if the 2nd 'kzalloc' fails, there is a memory leak
   - if 'sysfs_create_bin_file' fails there is also a memory leak

Fix it by adding a test after the first memory allocation and some error
handling paths to correctly free memory if needed.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 17:01:46 +02:00
..
Kconfig firmware: Google VPD sysfs driver 2017-04-18 18:05:23 +02:00
Makefile firmware: Google VPD sysfs driver 2017-04-18 18:05:23 +02:00
coreboot_table-acpi.c firmware: google memconsole: Add coreboot support 2017-04-08 18:05:36 +02:00
coreboot_table-of.c firmware: google memconsole: Add ARM/ARM64 support 2017-04-08 18:05:36 +02:00
coreboot_table.c firmware: google memconsole: Add coreboot support 2017-04-08 18:05:36 +02:00
coreboot_table.h firmware: google memconsole: Add coreboot support 2017-04-08 18:05:36 +02:00
gsmi.c firmware-gsmi: Delete an unnecessary check before the function call "dma_pool_destroy" 2016-09-09 16:08:45 +01:00
memconsole-coreboot.c firmware: google memconsole: Fix return value check in platform_memconsole_init() 2017-04-26 22:54:54 +02:00
memconsole-x86-legacy.c char/misc patches for 4.12-rc1 2017-05-04 19:15:35 -07:00
memconsole.c firmware: google memconsole: Move specific EBDA parts 2017-04-08 18:05:36 +02:00
memconsole.h firmware: google memconsole: Move specific EBDA parts 2017-04-08 18:05:36 +02:00
vpd.c firmware: Google VPD: Fix memory allocation error handling 2017-05-18 17:01:46 +02:00
vpd_decode.c firmware: Google VPD: import lib_vpd source files 2017-04-18 18:04:45 +02:00
vpd_decode.h firmware: Google VPD: import lib_vpd source files 2017-04-18 18:04:45 +02:00