提交 dea4e833 编写于 作者: E Erik Schmauss 提交者: Rafael J. Wysocki

ACPICA: Namespace: fix memory leak from building prefixed pathname

ACPICA commit f8ca5db30605467b851f86d152079631c27eeca8

Link: https://github.com/acpica/acpica/commit/f8ca5db3Signed-off-by: NErik Schmauss <erik.schmauss@intel.com>
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 16ccf829
...@@ -377,7 +377,7 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope, ...@@ -377,7 +377,7 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
{ {
acpi_status status; acpi_status status;
char *full_path = NULL; char *full_path = NULL;
char *external_path; char *external_path = NULL;
char *prefix_path = NULL; char *prefix_path = NULL;
u32 prefix_path_length = 0; u32 prefix_path_length = 0;
...@@ -423,6 +423,9 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope, ...@@ -423,6 +423,9 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
if (prefix_path) { if (prefix_path) {
ACPI_FREE(prefix_path); ACPI_FREE(prefix_path);
} }
if (external_path) {
ACPI_FREE(external_path);
}
return (full_path); return (full_path);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册