Revert "ACPICA: Fix memory leak if acpi_ps_get_next_field() fails"
This reverts commit 08791427f2
.
This commit is contained in:
parent
33e3696215
commit
ae2bfda1c1
1 changed files with 0 additions and 39 deletions
|
@ -25,8 +25,6 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state);
|
||||||
static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
|
static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
|
||||||
*parser_state);
|
*parser_state);
|
||||||
|
|
||||||
static void acpi_ps_free_field_list(union acpi_parse_object *start);
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ps_get_next_package_length
|
* FUNCTION: acpi_ps_get_next_package_length
|
||||||
|
@ -685,39 +683,6 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
|
||||||
return_PTR(field);
|
return_PTR(field);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: acpi_ps_free_field_list
|
|
||||||
*
|
|
||||||
* PARAMETERS: start - First Op in field list
|
|
||||||
*
|
|
||||||
* RETURN: None.
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Free all Op objects inside a field list.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
static void acpi_ps_free_field_list(union acpi_parse_object *start)
|
|
||||||
{
|
|
||||||
union acpi_parse_object *cur = start;
|
|
||||||
union acpi_parse_object *next;
|
|
||||||
union acpi_parse_object *arg;
|
|
||||||
|
|
||||||
while (cur) {
|
|
||||||
next = cur->common.next;
|
|
||||||
|
|
||||||
/* AML_INT_CONNECTION_OP can have a single argument */
|
|
||||||
|
|
||||||
arg = acpi_ps_get_arg(cur, 0);
|
|
||||||
if (arg) {
|
|
||||||
acpi_ps_free_op(arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
acpi_ps_free_op(cur);
|
|
||||||
cur = next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ps_get_next_arg
|
* FUNCTION: acpi_ps_get_next_arg
|
||||||
|
@ -786,10 +751,6 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
|
||||||
while (parser_state->aml < parser_state->pkg_end) {
|
while (parser_state->aml < parser_state->pkg_end) {
|
||||||
field = acpi_ps_get_next_field(parser_state);
|
field = acpi_ps_get_next_field(parser_state);
|
||||||
if (!field) {
|
if (!field) {
|
||||||
if (arg) {
|
|
||||||
acpi_ps_free_field_list(arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue