Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6af1c4fc authored by Jesper Juhl's avatar Jesper Juhl Committed by Len Brown
Browse files

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: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 76e10d15
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -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);
				arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP);
				if (!arg) {
				if (!arg) {
					acpi_ps_free_op(field);
					return_PTR(NULL);
					return_PTR(NULL);
				}
				}


@@ -662,6 +663,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
		} else {
		} else {
			arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP);
			arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP);
			if (!arg) {
			if (!arg) {
				acpi_ps_free_op(field);
				return_PTR(NULL);
				return_PTR(NULL);
			}
			}