mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 10:01:42 +00:00
Free the opcode_data malloc'ed memory instead of leaking it - thanks for catching that, Chris.
llvm-svn: 165597
This commit is contained in:
parent
73e465e148
commit
a72778119e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user