]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: memory leak in efi_set_bootdev()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 10 Jul 2022 13:46:57 +0000 (15:46 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 13 Jul 2022 18:07:07 +0000 (20:07 +0200)
efi_dp_str() allocates memory which should be released after use.

Use %pD printf code. Adjust message wording.

Fixes: d837cb1e3b6b ("efi: Add debugging to efi_set_bootdev()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
cmd/bootefi.c

index 37ce659fa123f4b2db90216181f9d090f1fe85cb..8ab0ff5a642ed51ceead68eeadae3fe2f27ae0ee 100644 (file)
@@ -119,9 +119,9 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path,
                        efi_free_pool(image_tmp);
                }
                bootefi_image_path = image;
-               log_debug("- recorded device %ls\n", efi_dp_str(device));
+               log_debug("- boot device %pD\n", device);
                if (image)
-                       log_debug("- and image %ls\n", efi_dp_str(image));
+                       log_debug("- image %pD\n", image);
        } else {
                log_debug("- efi_dp_from_name() failed, err=%lx\n", ret);
                efi_clear_bootdev();