:: commit 890c1aa18f9a02221f332012d2befd8a9cf17876

Mintsuki <mintsuki@protonmail.com> — 2026-02-08 16:33

parents: 1a0ae0323c

sys/smp: Free buffer and return NULL on zero APs in AArch64 ACPI path

diff --git a/common/sys/smp.c b/common/sys/smp.c
index 75c29390..9435fb47 100644
--- a/common/sys/smp.c
+++ b/common/sys/smp.c
@@ -552,6 +552,11 @@ static struct limine_mp_info *try_acpi_smp(size_t   *cpu_count,
         }
     }
 
+    if (*cpu_count == 0) {
+        pmm_free(ret, max_cpus * sizeof(struct limine_mp_info));
+        return NULL;
+    }
+
     return ret;
 }
 
tab: 248 wrap: offon