Skip to content
Snippets Groups Projects
Commit 64385f2f authored by Vasily Averin's avatar Vasily Averin Committed by Len Brown
Browse files

ACPI: fix potential memory leak in acpi_evaluate_integer() error path


Signed-off-by: default avatarVasily Averin <vvs@sw.ru>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 5810452d
No related branches found
No related tags found
No related merge requests found
......@@ -273,11 +273,13 @@ acpi_evaluate_integer(acpi_handle handle,
status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
if (ACPI_FAILURE(status)) {
acpi_util_eval_error(handle, pathname, status);
kfree(element);
return_ACPI_STATUS(status);
}
if (element->type != ACPI_TYPE_INTEGER) {
acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
kfree(element);
return_ACPI_STATUS(AE_BAD_DATA);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment