mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 07:09:08 +00:00
Fix a nasty dangling pointer problem, due to a free'd pointer being left in
a map. This caused problems if a later object happened to be allocated at the free'd object's address. llvm-svn: 16813
This commit is contained in:
parent
36e1648743
commit
d15e144241
@ -157,6 +157,9 @@ unsigned CompleteBUDataStructures::calculateSCCGraphs(DSGraph &FG,
|
||||
for (DSGraph::ReturnNodesTy::iterator I = NG->getReturnNodes().begin();
|
||||
I != NG->getReturnNodes().end(); ++I)
|
||||
DSInfo[I->first] = &FG;
|
||||
|
||||
// Remove NG from the ValMap since the pointer may get recycled.
|
||||
ValMap.erase(NG);
|
||||
delete NG;
|
||||
|
||||
Stack.pop_back();
|
||||
|
Loading…
Reference in New Issue
Block a user