You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ACPI: fix potential memory leak in acpi_evaluate_integer() error path
Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -273,11 +273,13 @@ acpi_evaluate_integer(acpi_handle handle,
|
|||||||
status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
|
status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
acpi_util_eval_error(handle, pathname, status);
|
acpi_util_eval_error(handle, pathname, status);
|
||||||
|
kfree(element);
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element->type != ACPI_TYPE_INTEGER) {
|
if (element->type != ACPI_TYPE_INTEGER) {
|
||||||
acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
|
acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
|
||||||
|
kfree(element);
|
||||||
return_ACPI_STATUS(AE_BAD_DATA);
|
return_ACPI_STATUS(AE_BAD_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user