mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 07:30:33 +00:00
Always free x86-64 mnemonic in parseOpcode()
This commit is contained in:
parent
2f0ee80e72
commit
3ec4d2d942
@ -5058,7 +5058,7 @@ static int parseOpcode(RAsm *a, const char *op, Opcode *out) {
|
||||
op += 4;
|
||||
}
|
||||
char *args = strchr (op, ' ');
|
||||
out->mnemonic = args ? r_str_ndup (op, args - op) : strdup (op);
|
||||
out->mnemonic = args? r_str_ndup (op, args - op): strdup (op);
|
||||
out->operands[0].type = out->operands[1].type = 0;
|
||||
out->operands[0].extended = out->operands[1].extended = false;
|
||||
out->operands[0].reg = out->operands[0].regs[0] = out->operands[0].regs[1] = X86R_UNDEFINED;
|
||||
@ -5148,6 +5148,7 @@ static int oprep(RAsm *a, ut8 *data, const Opcode *op) {
|
||||
if (instr.has_bnd) {
|
||||
retval++;
|
||||
}
|
||||
free (instr.mnemonic);
|
||||
return l + retval;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user