summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2012-06-18 17:31:11 -0400
committerMatthew Garrett <mjg@redhat.com>2012-06-18 17:31:42 -0400
commit49ebaa4b918164b1a6bf3090b13d784e7e99d9fb (patch)
treeef55a911f0e4f1829512692fcf555c58ef1fc146 /shim.c
parent019b0c5c139e66e8180bd9f5a4a08f2420528195 (diff)
downloadefi-boot-shim-49ebaa4b918164b1a6bf3090b13d784e7e99d9fb.tar.gz
efi-boot-shim-49ebaa4b918164b1a6bf3090b13d784e7e99d9fb.zip
Uninstall protocol on exit
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/shim.c b/shim.c
index 1bd595bc..f524aa65 100644
--- a/shim.c
+++ b/shim.c
@@ -855,6 +855,7 @@ EFI_STATUS efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *passed_systab)
EFI_GUID shim_lock_guid = SHIM_LOCK_GUID;
static SHIM_LOCK shim_lock_interface;
EFI_HANDLE handle = NULL;
+ EFI_STATUS efi_status;
shim_lock_interface.Verify = shim_verify;
@@ -866,5 +867,10 @@ EFI_STATUS efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *passed_systab)
&shim_lock_guid, EFI_NATIVE_INTERFACE,
&shim_lock_interface);
- return init_grub(image_handle);
+ efi_status = init_grub(image_handle);
+
+ uefi_call_wrapper(BS->UninstallProtocolInterface, 3, handle,
+ &shim_lock_guid, &shim_lock_interface);
+
+ return efi_status;
}