]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: check parameter new_handle of efi_file_open()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 15 Sep 2018 18:43:46 +0000 (20:43 +0200)
committerAlexander Graf <agraf@suse.de>
Sun, 23 Sep 2018 19:55:30 +0000 (21:55 +0200)
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>
lib/efi_loader/efi_file.c

index e090cf017cb30586e9708ec74fe5b9320e16f286..0753a36a20b2cb057f3e571cff597f7c779df3d5 100644 (file)
@@ -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;
        }