efi: app: Print the final message before freeing memory

Printing may make use of tables which could go away when freed, so do
the free as the last thing before exiting the app.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-15 13:59:45 -06:00
parent 9bb839094e
commit 70139c8226

View File

@@ -231,8 +231,8 @@ static void efi_exit(void)
{
struct efi_priv *priv = efi_get_priv();
free_memory(priv);
printf("U-Boot EFI exiting\n");
free_memory(priv);
priv->boot->exit(priv->parent_image, EFI_SUCCESS, 0, NULL);
}