android_kernel_sony_sdm845/drivers/platform
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Colin Ian King 5307944aa5 platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer
commit 98e2630284ab741804bd0713e932e725466f2f84 upstream.

Currently the kfree of output.pointer can be potentially freeing
an uninitalized pointer in the case where out_data is NULL. Fix this
by reworking the case where out_data is not-null to perform the
ACPI status check and also the kfree of outpoint.pointer in one block
and hence ensuring the pointer is only freed when it has been used.

Also replace the if (ptr != NULL) idiom with just if (ptr).

Fixes: ff0e9f26288d ("platform/x86: alienware-wmi: Correct a memory leak")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 16:42:00 +02:00
..
chrome platform/chrome: cros_ec_proto: check for NULL transfer function 2019-06-22 08:17:15 +02:00
goldfish goldfish: Sanitize the broken interrupt handler 2017-02-26 11:10:52 +01:00
mips MIPS: Loongson: Fix return value of loongson_hwmon_init 2020-01-29 10:24:35 +01:00
olpc platform/olpc: Make ec explicitly non-modular 2016-08-28 22:31:52 -07:00
x86 platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer 2020-05-27 16:42:00 +02:00
Kconfig goldfish: refactor goldfish platform configs 2016-01-28 23:34:36 -08:00
Makefile MIPS: Loongson-3: Add CPU Hwmon platform driver 2015-04-01 17:22:17 +02:00