提交 09e15086 编写于 作者: X Xiongfeng Wang 提交者: Rafael J. Wysocki

ACPI / utils: Fix memory leak in acpi_evaluate_reference() error path

When package.count is larger than ACPI_MAX_HANDLES, buffer.pointer is
not freed before the function returns AE_NO_MEMORY. Fix this possible
memory leak by kfree'ing it.
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 04ed5109
......@@ -355,6 +355,7 @@ acpi_evaluate_reference(acpi_handle handle,
}
if (package->package.count > ACPI_MAX_HANDLES) {
kfree(package);
return AE_NO_MEMORY;
}
list->count = package->package.count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册