[efi] Avoid using potentially uninitialised driver name in veto checks

Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/181/head
Michael Brown 2020-12-08 15:52:25 +00:00
parent 39f5293492
commit e3eedb0be5
1 changed files with 4 additions and 2 deletions

View File

@ -518,8 +518,10 @@ static int efi_veto_find ( EFI_HANDLE driver, const char *manufacturer,
/* Get driver name, if available */
if ( wtf.wtf &&
( ( efirc = wtf.wtf->GetDriverName ( wtf.wtf, "eng",
&name ) != 0 ) ) ) {
/* Ignore failure; is not required to be present */
&name ) == 0 ) ) ) {
/* Driver has a name */
} else {
/* Ignore failure; name is not required to be present */
name = NULL;
}