Index: stand/efi/boot1/boot1.c =================================================================== --- stand/efi/boot1/boot1.c +++ stand/efi/boot1/boot1.c @@ -106,8 +106,7 @@ size_t len; EFI_STATUS rv; - utf8_to_ucs2(varname, &var, &len); - if (var == NULL) + if (utf8_to_ucs2(varname, &var, &len) != 0) return (EFI_OUT_OF_RESOURCES); rv = RS->SetVariable(var, &FreeBSDBootVarGUID, EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,