2aacef
From 58a3aaaad640bee3cca79a644422489e184b49c1 Mon Sep 17 00:00:00 2001
2aacef
From: Jan Janssen <medhefgo@web.de>
2aacef
Date: Mon, 14 Nov 2022 14:18:26 +0100
2aacef
Subject: [PATCH] boot: Fix memory leak
2aacef
2aacef
(cherry picked from commit b7b327f856b3782f28be561d612d66ff406c7789)
2aacef
2aacef
Related: #2138081
2aacef
---
2aacef
 src/boot/efi/boot.c | 2 +-
2aacef
 1 file changed, 1 insertion(+), 1 deletion(-)
2aacef
2aacef
diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
2aacef
index 84f4cc11a3..17d4ec2d09 100644
2aacef
--- a/src/boot/efi/boot.c
2aacef
+++ b/src/boot/efi/boot.c
2aacef
@@ -2650,7 +2650,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
2aacef
         EFI_LOADED_IMAGE_PROTOCOL *loaded_image;
2aacef
         _cleanup_(file_closep) EFI_FILE *root_dir = NULL;
2aacef
         _cleanup_(config_free) Config config = {};
2aacef
-        char16_t *loaded_image_path;
2aacef
+        _cleanup_free_ char16_t *loaded_image_path = NULL;
2aacef
         EFI_STATUS err;
2aacef
         uint64_t init_usec;
2aacef
         bool menu = false;