From bbc8f58352a27e6b2b732840914fa9da167cf00c Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Fri, 31 Oct 2025 14:56:26 -0400 Subject: [PATCH] fix(shim): retain the protocol if the shim is loaded at all --- src/integrations/shim.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/integrations/shim.rs b/src/integrations/shim.rs index 1bf3f2b..b208eca 100644 --- a/src/integrations/shim.rs +++ b/src/integrations/shim.rs @@ -237,8 +237,13 @@ impl ShimSupport { if !installed { bail!("unable to install security hook require for this platform"); } - // Retain the shim protocol after load. - Self::retain()? + } + + // If the shim is loaded, we will need to retain the shim protocol to allow + // loading multiple images. + if shim_loaded { + // Retain the shim protocol after loading the image. + Self::retain()?; } // Converts the shim input to an owned data buffer.