Skip to content

Commit

Permalink
[1.11>master] [MERGE #5961 @MikeHolman] fix bug causing win7 pdata no…
Browse files Browse the repository at this point in the history
…t to get cleaned up

Merge pull request #5961 from MikeHolman:win7pdata
  • Loading branch information
MikeHolman committed Feb 20, 2019
2 parents 96c69fc + 02c0cbc commit 2b978f1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/Backend/NativeEntryPointData.cpp
Expand Up @@ -323,10 +323,17 @@ NativeEntryPointData::CleanupXDataInfo()
{
XDataAllocator::Unregister(this->xdataInfo);
#ifdef _WIN32
if (this->xdataInfo->functionTable
&& !DelayDeletingFunctionTable::AddEntry(this->xdataInfo))
if (AutoSystemInfo::Data.IsWin8OrLater())
{
DelayDeletingFunctionTable::DeleteFunctionTable(this->xdataInfo);
// transfers ownership of xdataInfo object
if(!DelayDeletingFunctionTable::AddEntry(this->xdataInfo))
{
DelayDeletingFunctionTable::DeleteFunctionTable(this->xdataInfo);
}
}
else
{
HeapDelete(this->xdataInfo);
}
#endif
this->xdataInfo = nullptr;
Expand Down

0 comments on commit 2b978f1

Please sign in to comment.