aboutsummaryrefslogtreecommitdiff
path: root/lib/MC
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-02-24 11:03:19 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-02-24 11:03:19 +0000
commitf26be1e9652dd6a05797986aaaaef041a82545f4 (patch)
tree441142edf9ec07939e0f03108fca24594b06e4d4 /lib/MC
parent8ca814c4e0a39e1fcac023f0fb014917da07a796 (diff)
Plug some leaks in edis.
- Don't leak parsed operands during tokenization. - Don't leak printed insts in llvm-mc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCDisassembler/EDToken.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/MC/MCDisassembler/EDToken.cpp b/lib/MC/MCDisassembler/EDToken.cpp
index 400e1649e9..de770b41ef 100644
--- a/lib/MC/MCDisassembler/EDToken.cpp
+++ b/lib/MC/MCDisassembler/EDToken.cpp
@@ -194,6 +194,10 @@ int EDToken::tokenize(std::vector<EDToken*> &tokens,
tokens.push_back(token);
}
+ // Free any parsed operands.
+ for (unsigned i = 0, e = parsedOperands.size(); i != e; ++i)
+ delete parsedOperands[i];
+
return 0;
}