summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2012-10-10 03:47:23 +0000
committerJason Molenda <jmolenda@apple.com>2012-10-10 03:47:23 +0000
commita72778119ee42ec636d01366a53daa59b5b82353 (patch)
tree40d3ba4ef4ebff82c5cb24e8019e3f306f2dd681 /lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
parent73e465e148e1fef84197388ca90e995edcdbedc5 (diff)
downloadbcm5719-llvm-a72778119ee42ec636d01366a53daa59b5b82353.tar.gz
bcm5719-llvm-a72778119ee42ec636d01366a53daa59b5b82353.zip
Free the opcode_data malloc'ed memory instead of leaking it - thanks for catching that, Chris.
llvm-svn: 165597
Diffstat (limited to 'lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp')
-rw-r--r--lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
index e92a5004011..4094ccf6670 100644
--- a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
@@ -485,6 +485,7 @@ AssemblyParse_x86::instruction_length (Address addr, int &length)
Target *target = m_exe_ctx.GetTargetPtr();
if (target->ReadMemory (addr, prefer_file_cache, opcode_data, max_op_byte_size, error) == -1)
{
+ free (opcode_data);
return false;
}
@@ -498,7 +499,7 @@ AssemblyParse_x86::instruction_length (Address addr, int &length)
sizeof(out_string));
length = inst_size;
-
+ free (opcode_data);
return true;
}
OpenPOWER on IntegriCloud