Skip to content

Commit

Permalink
fix string name not freed
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanpencil authored and XVilka committed Jul 14, 2018
1 parent 62a54b8 commit 704a497
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libr/core/disasm.c
Expand Up @@ -1190,7 +1190,6 @@ static void ds_show_xrefs(RDisasmState *ds) {
if (refi->at == ds->at) {
fun = fcnIn (ds, refi->addr, -1);
if (fun) {
name = strdup (fun->name);
if (iter != xrefs->tail) {
ut64 next_addr = ((RAnalRef *)(iter->n->data))->addr;
next_fun = r_anal_get_fcn_in (core->anal, next_addr, -1);
Expand All @@ -1199,11 +1198,11 @@ static void ds_show_xrefs(RDisasmState *ds) {
continue;
}
}
name = strdup (fun->name);
r_list_append (addrs, refi->addr);
} else {
f = r_flag_get_at (core->flags, refi->addr, true);
if (f) {
name = strdup (f->name);
if (iter != xrefs->tail) {
ut64 next_addr = ((RAnalRef *)(iter->n->data))->addr;
next_f = r_flag_get_at (core->flags, next_addr, true);
Expand All @@ -1212,6 +1211,7 @@ static void ds_show_xrefs(RDisasmState *ds) {
continue;
}
}
name = strdup (f->name);
r_list_append (addrs, refi->addr - f->offset);
} else {
name = strdup ("unk");
Expand Down

0 comments on commit 704a497

Please sign in to comment.