mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 13:22:57 +00:00
ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
[ Upstream commit ae5a0eccc8
]
ACPICA commit 0d5f467d6a0ba852ea3aad68663cbcbd43300fd4
ACPI_ALLOCATE_ZEROED may fails, object_info might be null and will cause
null pointer dereference later.
Link: https://github.com/acpica/acpica/commit/0d5f467d
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8c4a7163b7
commit
fee6133490
1 changed files with 3 additions and 0 deletions
|
@ -652,6 +652,9 @@ acpi_status acpi_db_display_objects(char *obj_type_arg, char *display_count_arg)
|
|||
object_info =
|
||||
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info));
|
||||
|
||||
if (!object_info)
|
||||
return (AE_NO_MEMORY);
|
||||
|
||||
/* Walk the namespace from the root */
|
||||
|
||||
(void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
|
||||
|
|
Loading…
Reference in a new issue