Thread (57 messages) 57 messages, 5 authors, 2012-07-25
STALE5068d

[PATCH 01/52] ACPICA: AML Parser: Fix two possible memory leaks in error path

From: Len Brown <lenb@kernel.org>
Date: 2012-07-25 03:56:20
Also in: linux-acpi, lkml
Subsystem: acpi, acpi component architecture (acpica), the rest · Maintainers: "Rafael J. Wysocki", Saket Dumbre, Linus Torvalds

From: Jesper Juhl <redacted>

Fixes a couple of memory leaks in the error recovery path.

Signed-off-by: Jesper Juhl <redacted>
Signed-off-by: Bob Moore <redacted>
Signed-off-by: Lin Ming <redacted>
Signed-off-by: Len Brown <redacted>
---
 drivers/acpi/acpica/psargs.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 5ac36ab..a683d66 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -618,6 +618,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
 
 				arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP);
 				if (!arg) {
+					acpi_ps_free_op(field);
 					return_PTR(NULL);
 				}
 
@@ -662,6 +663,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
 		} else {
 			arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP);
 			if (!arg) {
+				acpi_ps_free_op(field);
 				return_PTR(NULL);
 			}
 
-- 
1.7.12.rc0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help