summaryrefslogtreecommitdiff
path: root/lib/efi_selftest/efi_selftest_controllers.c
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2023-06-20 09:19:29 +0300
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-07-15 11:20:41 +0200
commit747d16d93c3b03e835925dd9ecb8f8d0b8d1ad22 (patch)
treebcd3faba48c5f3dfbc3cd8fbecfefe45456eed68 /lib/efi_selftest/efi_selftest_controllers.c
parent239d59a65e203171fb94d0ab935ced35902fed1b (diff)
efi_loader: check the status of disconnected drivers
efi_uninstall_protocol() calls efi_disconnect_all_drivers() but never checks the return value. Instead it tries to identify protocols that are still open after closing the ones that were opened with EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL, EFI_OPEN_PROTOCOL_GET_PROTOCOL and EFI_OPEN_PROTOCOL_TEST_PROTOCOL. Instead of doing that, check the return value early and exit if disconnecting the drivers failed. Also reconnect all the drivers of a handle if protocols are still found on the handle after disconnecting controllers and closing the remaining protocols. While at it fix a memory leak and properly free the opened protocol information when closing a protocol. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_selftest/efi_selftest_controllers.c')
0 files changed, 0 insertions, 0 deletions