mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Fixed a memory bug in the MCDisassembler where
MCParsedAsmOperand objects were being leaked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138053 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
67b95f902a
commit
40827c4190
@ -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