ACPI processor: fix theoretical memleak
PATCH 1/1 ACPI processor: fix theoretical memleak
Signed-off-by Alan Jenkins <[email protected]>
--- drivers/acpi/processor_core.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/acpi/processor_core.c +4 -2
@@ -781,8 +781,8 @@ static int acpi_processor_add(struct acpi_device *device)return -ENOMEM ;if (!zalloc_cpumask_var (&pr->throttling.shared_cpu_map,GFP_KERNEL )) { -kfree (pr); -return -ENOMEM ; + result = -ENOMEM ; + goto err_free_pr; } pr->handle = device->handle;
@@ -882,6 +882,8 @@ err_remove_fs:acpi_processor_remove_fs (device); err_free_cpumask:free_cpumask_var (pr->throttling.shared_cpu_map); +err_free_pr: +kfree (pr);return result; }
Signature · 1 line
1.6.3.2