[Lldb-commits] [lldb] r154185 - /lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
Sean Callanan
scallanan at apple.com
Fri Apr 6 10:59:49 PDT 2012
Author: spyffe
Date: Fri Apr 6 12:59:49 2012
New Revision: 154185
URL: http://llvm.org/viewvc/llvm-project?rev=154185&view=rev
Log:
Fixed a leak in the LLVM disassembler where we
did not destroy the underlying disassembler in
our destructor.
Modified:
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=154185&r1=154184&r2=154185&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Fri Apr 6 12:59:49 2012
@@ -472,6 +472,16 @@
DisassemblerLLVMC::~DisassemblerLLVMC()
{
+ if (m_disasm_context)
+ {
+ ::LLVMDisasmDispose(m_disasm_context);
+ m_disasm_context = NULL;
+ }
+ if (m_alternate_disasm_context)
+ {
+ ::LLVMDisasmDispose(m_alternate_disasm_context);
+ m_alternate_disasm_context = NULL;
+ }
}
size_t
More information about the lldb-commits
mailing list