https://github.com/torvalds/linux
Revision ed4b197ddd4d7aa6623e7777ea326c67c3a6b8ed authored by Colin Ian King on 02 July 2014, 23:35:09 UTC, committed by Rafael J. Wysocki on 07 July 2014, 11:20:30 UTC
Smatch detected two memory leaks on saved_ec:

drivers/acpi/ec.c:1070 acpi_ec_ecdt_probe() warn: possible
  memory leak of 'saved_ec'
drivers/acpi/ec.c:1109 acpi_ec_ecdt_probe() warn: possible
  memory leak of 'saved_ec'

Free saved_ec on these two error exit paths to stop the memory
leak.  Note that saved_ec maybe null, but kfree on null is allowed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent dd43de2
History
Tip revision: ed4b197ddd4d7aa6623e7777ea326c67c3a6b8ed authored by Colin Ian King on 02 July 2014, 23:35:09 UTC
ACPI / EC: Free saved_ec on error exit path
Tip revision: ed4b197
File Mode Size
samsung
ti-soc-thermal
Kconfig -rw-r--r-- 7.8 KB
Makefile -rw-r--r-- 1.2 KB
armada_thermal.c -rw-r--r-- 8.4 KB
cpu_cooling.c -rw-r--r-- 16.4 KB
db8500_cpufreq_cooling.c -rw-r--r-- 2.8 KB
db8500_thermal.c -rw-r--r-- 13.9 KB
dove_thermal.c -rw-r--r-- 5.0 KB
fair_share.c -rw-r--r-- 3.5 KB
imx_thermal.c -rw-r--r-- 15.2 KB
int3403_thermal.c -rw-r--r-- 5.9 KB
intel_powerclamp.c -rw-r--r-- 21.2 KB
intel_soc_dts_thermal.c -rw-r--r-- 10.9 KB
kirkwood_thermal.c -rw-r--r-- 3.3 KB
of-thermal.c -rw-r--r-- 21.1 KB
rcar_thermal.c -rw-r--r-- 12.0 KB
spear_thermal.c -rw-r--r-- 5.2 KB
step_wise.c -rw-r--r-- 6.3 KB
thermal_core.c -rw-r--r-- 47.1 KB
thermal_core.h -rw-r--r-- 3.1 KB
thermal_hwmon.c -rw-r--r-- 7.3 KB
thermal_hwmon.h -rw-r--r-- 1.6 KB
user_space.c -rw-r--r-- 1.7 KB
x86_pkg_temp_thermal.c -rw-r--r-- 16.4 KB

back to top