Skip to content

Commit

Permalink
ACPICA: AML Parser: Fix two possible memory leaks in error path
Browse files Browse the repository at this point in the history
Fixes a couple of memory leaks in the error recovery path.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Jesper Juhl authored and Len Brown committed Jun 1, 2012
1 parent 76e10d1 commit 6af1c4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/psargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 6af1c4f

Please sign in to comment.