]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_loader: efi_disk_register() should not fail
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 20 Nov 2021 12:56:02 +0000 (13:56 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 26 Nov 2021 20:30:59 +0000 (21:30 +0100)
commitcd9a26bfe56344822c75edbc771526099efe63e6
tree91a10fc83f6832c0eea7457ffc645b35dcd55973
parent3f73e79de83ecc78b9a9c823b8118ab1fba63b0a
efi_loader: efi_disk_register() should not fail

Our algorithm for creating USB device paths may lead to duplicate device
paths which result in efi_disk_register() failing. Instead we should just
skip devices that cannot be registered as EFI block devices.

Fix a memory leak in efi_disk_add_dev() caused by the duplicate device
path.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_disk.c