diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/lib.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/lib.rs index 8776d79..f2643c0 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/lib.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/lib.rs @@ -141,12 +141,12 @@ impl ProcessManagerInterface for KataManagerInterface { let bundle_frames = kata_security_load_application(&bundle.app_id, &container_slot)?; let mut sel4_bundle = seL4BundleImpl::new(bundle, &bundle_frames)?; - sel4_bundle.start()?; - // sel4_bundle owns container_slot now; release our ref so it's not // reclaimed when container_slot goes out of scope. container_slot.release(); + sel4_bundle.start()?; + Ok(Box::new(sel4_bundle) as _) } fn stop(&mut self, bundle_impl: &mut dyn BundleImplInterface) -> Result<(), ProcessManagerError> {