diff --git a/rEFIt_UEFI/Platform/DataHubCpu.cpp b/rEFIt_UEFI/Platform/DataHubCpu.cpp index 5b8f4ff43..c5cdb308e 100644 --- a/rEFIt_UEFI/Platform/DataHubCpu.cpp +++ b/rEFIt_UEFI/Platform/DataHubCpu.cpp @@ -447,6 +447,9 @@ SetVariablesForOSX(LOADER_ENTRY *Entry) LangLen = 0; AddNvramVariable(L"wake-failure", &gEfiAppleBootGuid, Attributes, 5, &LangLen); + //clear OC present + DeleteNvramVariable(L"opencore-version", &gEfiAppleBootGuid); + return EFI_SUCCESS; } diff --git a/rEFIt_UEFI/Platform/Nvram.cpp b/rEFIt_UEFI/Platform/Nvram.cpp index b74b97e52..e266fee7e 100755 --- a/rEFIt_UEFI/Platform/Nvram.cpp +++ b/rEFIt_UEFI/Platform/Nvram.cpp @@ -380,7 +380,7 @@ ResetNativeNvram () //DbgHeader("ResetNativeNvram: cleanup NVRAM variables"); NameSize = sizeof (CHAR16); - Name = (__typeof__(Name))AllocateZeroPool(NameSize); + Name = (__typeof__(Name))AllocatePool(NameSize); if (Name == NULL) { return Status; }