summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2025-06-25 20:15:28 +0300
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2025-06-28 13:03:19 +0200
commite80baf06af50a4c8c6f41e9b67f9931f964ced87 (patch)
treef27d6f3425dea4bc984c6fede0e7ce73f5d17917
parent97d6a2e3fe619b50303f97d0eebafaf50f1f075d (diff)
efi_loader: initialize 'total' variable
This variable might end up being uninitialized if we exit early. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r--lib/efi_loader/efi_bootmgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 1a3461f5a9d..83f4a3525bd 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -1133,7 +1133,7 @@ efi_status_t efi_bootmgr_update_media_device_boot_option(void)
{
u32 i;
efi_status_t ret;
- efi_uintn_t count, num, total;
+ efi_uintn_t count, num, total = 0;
efi_handle_t *handles = NULL;
struct eficonfig_media_boot_option *opt = NULL;