diff mbox series

efi_loader: add missing EFI_CALL when closing a file

Message ID 20221111162037.1290769-1-ilias.apalodimas@linaro.org
State Accepted
Commit 64012e0c52eefa6fbfedbad772133a478bd741ea
Headers show
Series efi_loader: add missing EFI_CALL when closing a file | expand

Commit Message

Ilias Apalodimas Nov. 11, 2022, 4:20 p.m. UTC
Closing the files uses the EFI protocol and specifically it's .close
callback.  This needs to be wrapped on an EFI_CALL()

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 lib/efi_loader/efi_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heinrich Schuchardt Nov. 14, 2022, 8:34 a.m. UTC | #1
On 11/11/22 17:20, Ilias Apalodimas wrote:
> Closing the files uses the EFI protocol and specifically it's .close
> callback.  This needs to be wrapped on an EFI_CALL()
> 
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> ---
>   lib/efi_loader/efi_file.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
> index 9e6c2b118900..750d380ad967 100644
> --- a/lib/efi_loader/efi_file.c
> +++ b/lib/efi_loader/efi_file.c
> @@ -1131,7 +1131,7 @@ struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp)
>   
>   		if (!EFI_DP_TYPE(fp, MEDIA_DEVICE, FILE_PATH)) {
>   			printf("bad file path!\n");
> -			f->close(f);
> +			EFI_CALL(f->close(f));
>   			return NULL;
>   		}
>   

Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
diff mbox series

Patch

diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 9e6c2b118900..750d380ad967 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -1131,7 +1131,7 @@  struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp)
 
 		if (!EFI_DP_TYPE(fp, MEDIA_DEVICE, FILE_PATH)) {
 			printf("bad file path!\n");
-			f->close(f);
+			EFI_CALL(f->close(f));
 			return NULL;
 		}