diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 475c9079bf85..ce3d3248ebe5 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -358,6 +358,7 @@ acpi_evaluate_reference(acpi_handle handle, } if (package->package.count > ACPI_MAX_HANDLES) { + kfree(package); return AE_NO_MEMORY; } list->count = package->package.count;