Skip to content
Snippets Groups Projects
Commit bb8bb303 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt :speech_balloon:
Browse files

efi_loader: CloseProtocol in tcg2_measure_gpt_data


The CloseProtocol() boot service requires a handle as first argument.
Passing the protocol interface is incorrect.

CloseProtocol() only has an effect if called with a non-zero value for
agent_handle. HandleProtocol() uses an opaque agent_handle when invoking
OpenProtocol() (currently NULL). Therefore HandleProtocol() should be
avoided.

* Replace the LocateHandle() call by efi_search_protocol().
* Remove the CloseProtocol() call.
* Remove a superfluous goto.

Fixes: ce3dbc5d ("efi_loader: add UEFI GPT measurement")
Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent fcdf531d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment