Fixed a memory bug in the MCDisassembler where

MCParsedAsmOperand objects were being leaked.

llvm-svn: 138053
This commit is contained in:
Sean Callanan 2011-08-19 18:23:06 +00:00
parent 6d9a3e68bb
commit e6d9e9ed24

View File

@ -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;