Skip to content

Commit

Permalink
[1.8>1.9] [MERGE #4557 @MikeHolman] use LocalFree for freeing JIT fai…
Browse files Browse the repository at this point in the history
…lure message

Merge pull request #4557 from MikeHolman:localfreeerror

Per [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx)

>The caller should use the LocalFree function to free the buffer when it is no longer needed.
  • Loading branch information
MikeHolman committed Jan 19, 2018
2 parents 7749fb8 + 46dff6f commit 11715ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/JITClient/JITManager.cpp
Original file line number Diff line number Diff line change
@@ -151,7 +151,7 @@ JITManager::CreateBinding(
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, errorNumber, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&messageBuffer, 0, NULL);
Output::Print(_u("Last error was 0x%x (%s)"), errorNumber, messageBuffer);
free(messageBuffer);
LocalFree(messageBuffer);
#endif
// wait operation failed for an unknown reason.
Assert(false);

0 comments on commit 11715ee

Please sign in to comment.