Commit 9aff366 1 parent bb77cca commit 9aff366 Copy full SHA for 9aff366
File tree 1 file changed +1
-6
lines changed
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -220,11 +220,6 @@ HookedLoadImage(
220
220
LoadedImage -> ImageBase ,
221
221
LoadedImage -> ImageSize );
222
222
}
223
- else
224
- {
225
- // A non-Windows OS is being booted. Unload ourselves
226
- EfiGuardUnload (gImageHandle );
227
- }
228
223
}
229
224
}
230
225
@@ -402,7 +397,7 @@ ExitBootServicesEvent(
402
397
// If the DSE bypass method is *not* DSE_DISABLE_SETVARIABLE_HOOK, perform some cleanup now. In principle this should allow
403
398
// linking with /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER, because our driver image may be freed after this callback returns.
404
399
// Using DSE_DISABLE_SETVARIABLE_HOOK requires linking with /SUBSYSTEM:EFI_RUNTIME_DRIVER, because the image must not be freed.
405
- if (gDriverConfig .DseBypassMethod != DSE_DISABLE_SETVARIABLE_HOOK )
400
+ if (gDriverConfig .DseBypassMethod != DSE_DISABLE_SETVARIABLE_HOOK || gBootmgfwHandle == NULL )
406
401
{
407
402
// Uninstall our installed driver protocols
408
403
gBS -> UninstallMultipleProtocolInterfaces (gImageHandle ,
You can’t perform that action at this time.
0 commit comments