fix(shim): retain the protocol if the shim is loaded at all

This commit is contained in:
2025-10-31 14:56:26 -04:00
parent b3424fcd8f
commit bbc8f58352

View File

@@ -237,8 +237,13 @@ impl ShimSupport {
if !installed { if !installed {
bail!("unable to install security hook require for this platform"); 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. // Converts the shim input to an owned data buffer.