summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvoid0red <30990023+void0red@users.noreply.github.com>2023-03-21 14:59:27 +0800
committerGitHub <noreply@github.com>2023-03-21 14:59:27 +0800
commit0d5f467d6a0ba852ea3aad68663cbcbd43300fd4 (patch)
tree2f1d326067e673c75fd50b58d4fee84a2b6a79f1
parent682350c40c13504e3e880ebfd7d08b9f803d72dd (diff)
downloadacpica-0d5f467d6a0ba852ea3aad68663cbcbd43300fd4.tar.gz
ACPICA: check null return of ACPI_ALLOCATE_ZEROED in AcpiDbDisplayObjects
ACPI_ALLOCATE_ZEROED may fails, ObjectInfo might be null and will cause null pointer dereference later.
-rw-r--r--source/components/debugger/dbnames.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c
index ae4a10ca5..084a25287 100644
--- a/source/components/debugger/dbnames.c
+++ b/source/components/debugger/dbnames.c
@@ -883,6 +883,9 @@ AcpiDbDisplayObjects (
if (!ObjTypeArg)
{
ObjectInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_OBJECT_INFO));
+
+ if (!ObjectInfo)
+ return (AE_NO_MEMORY);
/* Walk the namespace from the root */