From: Jesper Juhl Date: Thu, 3 May 2012 01:38:10 +0000 (+0800) Subject: ACPICA: AML Parser: Fix two possible memory leaks in error path X-Git-Tag: firefly_0821_release~3680^2~2244^2~3^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6af1c4fc5227af65092ebc848989693562bfa3e8;p=firefly-linux-kernel-4.4.55.git ACPICA: AML Parser: Fix two possible memory leaks in error path Fixes a couple of memory leaks in the error recovery path. Signed-off-by: Jesper Juhl Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c index 5ac36aba507c..a683d6606e2e 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); }