mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-11 00:06:19 +00:00
Do not free ds->opstr after r_parse_immtrim (#17728)
There is no new allocation in r_parse_immtrim, so it is not required to free the "previous" string.
This commit is contained in:
parent
e3999b7fcd
commit
ce143ac837
@ -1051,7 +1051,6 @@ static void ds_build_op_str(RDisasmState *ds, bool print_color) {
|
||||
if (ds->immtrim) {
|
||||
char *res = r_parse_immtrim (ds->opstr);
|
||||
if (res) {
|
||||
free (ds->opstr);
|
||||
ds->opstr = res;
|
||||
}
|
||||
return;
|
||||
|
@ -2213,3 +2213,16 @@ EXPECT=<<EOF
|
||||
66: parell (char *s);
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=asm.imm.trim
|
||||
FILE=bins/elf/crackme0x05
|
||||
CMDS=<<EOF
|
||||
s 0x080483d5
|
||||
pi 1 @e:asm.imm.trim=false
|
||||
pi 1 @e:asm.imm.trim=true
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
and esp, 0xfffffff0
|
||||
and esp,
|
||||
EOF
|
||||
RUN
|
||||
|
Loading…
x
Reference in New Issue
Block a user