config_add_entry_loader_auto() returns NULL when the Windows loader
is missing. With reboot-for-bitlocker enabled, the caller still
assigned e->call and could dereference NULL.
This can happen when reboot-for-bitlocker is enabled but the ESP does
not contain EFI/Microsoft/Boot/bootmgfw.efi.
Before:
systemd-boot could dereference NULL while building the menu
Follow-up for:
661615a0afacee3545cde0a48286c0fef983f8fe.
title ?: u"Windows Boot Manager",
u"\\EFI\\Microsoft\\Boot\\bootmgfw.efi");
- if (config->reboot_for_bitlocker)
+ if (e && config->reboot_for_bitlocker)
e->call = call_boot_windows_bitlocker;
#endif
}