[PATCH 08/15] ACPICA: Namespace: fix memory leak from building prefixed pathname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACPICA commit f8ca5db30605467b851f86d152079631c27eeca8

Link: https://github.com/acpica/acpica/commit/f8ca5db3
Signed-off-by: Erik Schmauss <erik.schmauss@xxxxxxxxx>
Signed-off-by: Bob Moore <robert.moore@xxxxxxxxx>
---
 drivers/acpi/acpica/nsnames.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c
index 4203d4589b6d..22c92d1a24d8 100644
--- a/drivers/acpi/acpica/nsnames.c
+++ b/drivers/acpi/acpica/nsnames.c
@@ -377,7 +377,7 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
 {
 	acpi_status status;
 	char *full_path = NULL;
-	char *external_path;
+	char *external_path = NULL;
 	char *prefix_path = NULL;
 	u32 prefix_path_length = 0;
 
@@ -423,6 +423,9 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
 	if (prefix_path) {
 		ACPI_FREE(prefix_path);
 	}
+	if (external_path) {
+		ACPI_FREE(external_path);
+	}
 
 	return (full_path);
 }
-- 
2.13.6

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux