Linux and Windows platform fixes

This commit is contained in:
2016-11-11 20:46:19 +01:00
parent a9c383ee77
commit 7490d08197
3 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ std::pair<std::uint8_t*, std::size_t> Platform::UEFIReadVariable(const std::stri
auto nameUTF16 = boost::locale::conv::utf_to_utf<char16_t, char>(name);
const std::size_t bufferSize = 2048;
std::uint8_t* data = new std::uint8_t[bufferSize];
std::uint8_t* data = std::malloc(bufferSize);
std::size_t size = GetFirmwareEnvironmentVariableW(reinterpret_cast<LPCWSTR>(nameUTF16.c_str()), EFI_GLOBAL_GUID, data, sizeof(std::uint8_t) * bufferSize);
if (size == 0) {
std::stringstream message;