From 5ea8a56611c3c144bb7bc419f6729f4bea2fdff1 Mon Sep 17 00:00:00 2001 From: Paul Pan Date: Sun, 28 Apr 2024 20:45:10 +0800 Subject: [PATCH] fix: untyped retype: check null --- kernel/src/objects/untyped.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/objects/untyped.rs b/kernel/src/objects/untyped.rs index fecca9b..89d7ef0 100644 --- a/kernel/src/objects/untyped.rs +++ b/kernel/src/objects/untyped.rs @@ -89,7 +89,7 @@ impl UntypedCap<'_> { slots .iter() .any(|cte| NullCap::try_from(cte).is_err()) - .then_ok((), SysError::CapTypeMismatch)?; + .else_ok((), SysError::CapTypeMismatch)?; // Start allocating from free_offset // Notice: in vallina seL4, it will check whether there are child nodes,