mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-22 09:31:51 +00:00
[efi] Unload our own image before exiting UEFI application
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
e662912c53
commit
f618178e60
@ -37,11 +37,16 @@ EFI_STATUS EFIAPI _efi_start ( EFI_HANDLE image_handle,
|
||||
|
||||
/* Initialise EFI environment */
|
||||
if ( ( efirc = efi_init ( image_handle, systab ) ) != 0 )
|
||||
return efirc;
|
||||
goto err_init;
|
||||
|
||||
/* Call to main() */
|
||||
if ( ( rc = main() ) != 0 )
|
||||
return EFIRC ( rc );
|
||||
if ( ( rc = main() ) != 0 ) {
|
||||
efirc = EFIRC ( rc );
|
||||
goto err_main;
|
||||
}
|
||||
|
||||
return 0;
|
||||
err_main:
|
||||
efi_loaded_image->Unload ( image_handle );
|
||||
err_init:
|
||||
return efirc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user