Merge tag 'acpi-fix-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fix from Rafael Wysocki: "This fixes a possible memory leak in an error code path in one of the utility routines (Xiongfeng Wang)" * tag 'acpi-fix-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / utils: Fix memory leak in acpi_evaluate_reference() error path
This commit is contained in:
@@ -355,6 +355,7 @@ acpi_evaluate_reference(acpi_handle handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (package->package.count > ACPI_MAX_HANDLES) {
|
if (package->package.count > ACPI_MAX_HANDLES) {
|
||||||
|
kfree(package);
|
||||||
return AE_NO_MEMORY;
|
return AE_NO_MEMORY;
|
||||||
}
|
}
|
||||||
list->count = package->package.count;
|
list->count = package->package.count;
|
||||||
|
Reference in New Issue
Block a user