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