提交 4219853a 编写于 作者: A Ashwin Chaugule 提交者: Rafael J. Wysocki

ACPI / CPPC: Fix potential memory leak

Commit 337aadff (ACPI: Introduce CPU performance controls using CPPC)
leads to the following static checker warning:

        drivers/acpi/cppc_acpi.c:527 acpi_cppc_processor_probe()
        warn: overwrite may leak 'cpc_ptr'

Fix the warning by removing the bogus per-CPU pointer dereference.

Fixes: 337aadff (ACPI: Introduce CPU performance controls using CPPC)
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAshwin Chaugule <ashwin.chaugule@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 32c0b2f6
......@@ -524,7 +524,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
return 0;
out_free:
cpc_ptr = per_cpu(cpc_desc_ptr, pr->id);
kfree(cpc_ptr);
out_buf_free:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册