mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
Fixed a memory bug in the MCDisassembler where
MCParsedAsmOperand objects were being leaked. llvm-svn: 138053
This commit is contained in:
parent
6d9a3e68bb
commit
e6d9e9ed24
@ -93,8 +93,12 @@ int EDToken::tokenize(std::vector<EDToken*> &tokens,
|
||||
SmallVector<AsmToken, 10> asmTokens;
|
||||
|
||||
if (disassembler.parseInst(parsedOperands, asmTokens, str))
|
||||
{
|
||||
for (unsigned i = 0, e = parsedOperands.size(); i != e; ++i)
|
||||
delete parsedOperands[i];
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
SmallVectorImpl<MCParsedAsmOperand*>::iterator operandIterator;
|
||||
unsigned int operandIndex;
|
||||
SmallVectorImpl<AsmToken>::iterator tokenIterator;
|
||||
|
Loading…
Reference in New Issue
Block a user