From: Heinrich Schuchardt <xypron.glpk@gmx.de> Date: Sat, 15 Sep 2018 18:43:46 +0000 (+0200) Subject: efi_loader: check parameter new_handle of efi_file_open() X-Git-Tag: v2025.01-rc5-pxa1908~3516^2~18 X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/index.html?a=commitdiff_plain;h=d3dce35aabf1a0f3359c1129cc668850c00f95ea;p=u-boot.git efi_loader: check parameter new_handle of efi_file_open() We should not check parameter file twice. We should check parameter new_handle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de> --- diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index e090cf017c..0753a36a20 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -218,7 +218,7 @@ static efi_status_t EFIAPI efi_file_open(struct efi_file_handle *file, open_mode, attributes); /* Check parameters */ - if (!file || !file || !file_name) { + if (!file || !new_handle || !file_name) { ret = EFI_INVALID_PARAMETER; goto out; }