diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2009-09-02 14:22:03 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2009-09-02 14:22:03 +0000 |
commit | 531552aaa24218c1b2043cf56d719f3d940aeed4 (patch) | |
tree | 6aad9afe926fa494ca629b63b0a2eb5d9b1a4c31 /lib/AsmParser/LLParser.cpp | |
parent | 2252d481d66ddc3462acbd7473d9a1d4702b64ee (diff) |
plug memory leak in LLParser::PerFunctionState::SetInstName() by deleting a value after replacing it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 9424328910..3d2e3125aa 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1701,6 +1701,7 @@ bool LLParser::PerFunctionState::SetInstName(int NameID, return P.Error(NameLoc, "instruction forward referenced with type '" + FI->second.first->getType()->getDescription() + "'"); FI->second.first->replaceAllUsesWith(Inst); + delete FI->second.first; ForwardRefVals.erase(FI); } |