Skip to content

Commit bbc8f58

Browse files
committed
fix(shim): retain the protocol if the shim is loaded at all
1 parent b3424fc commit bbc8f58

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/integrations/shim.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,13 @@ impl ShimSupport {
237237
if !installed {
238238
bail!("unable to install security hook require for this platform");
239239
}
240-
// Retain the shim protocol after load.
241-
Self::retain()?
240+
}
241+
242+
// If the shim is loaded, we will need to retain the shim protocol to allow
243+
// loading multiple images.
244+
if shim_loaded {
245+
// Retain the shim protocol after loading the image.
246+
Self::retain()?;
242247
}
243248

244249
// Converts the shim input to an owned data buffer.

0 commit comments

Comments
 (0)