Skip to content

Commit ae5a0ec

Browse files
void0redrafaeljw
authored andcommitted
ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
ACPICA commit 0d5f467d6a0ba852ea3aad68663cbcbd43300fd4 ACPI_ALLOCATE_ZEROED may fails, object_info might be null and will cause null pointer dereference later. Link: acpica/acpica@0d5f467d Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 376b0fb commit ae5a0ec

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/acpi/acpica/dbnames.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,9 @@ acpi_status acpi_db_display_objects(char *obj_type_arg, char *display_count_arg)
652652
object_info =
653653
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info));
654654

655+
if (!object_info)
656+
return (AE_NO_MEMORY);
657+
655658
/* Walk the namespace from the root */
656659

657660
(void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,

0 commit comments

Comments
 (0)