- Don't free appended aop's
  - Set bbc->cond = NULL in printed bbs list
This commit is contained in:
Nibble 2010-06-15 16:19:20 +02:00
parent 5751019088
commit a129564c1c
2 changed files with 2 additions and 7 deletions

View File

@ -75,27 +75,22 @@ R_API int r_anal_bb(RAnal *anal, RAnalBlock *bb, ut64 addr, ut8 *buf, ut64 len,
// TODO: get values from anal backend
bb->cond->type = R_ANAL_COND_TYPE_Z;
bb->cond->negate = 0;
} else eprintf ("Unknown conditional for block 0x"PFMT64x"\n", bb->addr);
} else eprintf ("Unknown conditional for block 0x%"PFMT64x"\n", bb->addr);
bb->fail = aop->fail;
bb->jump = aop->jump;
bb->type |= R_ANAL_BB_TYPE_BODY;
r_anal_aop_free (aop);
return R_ANAL_RET_END;
case R_ANAL_OP_TYPE_JMP:
bb->jump = aop->jump;
bb->type |= R_ANAL_BB_TYPE_BODY;
r_anal_aop_free (aop);
return R_ANAL_RET_END;
case R_ANAL_OP_TYPE_UJMP:
bb->type |= R_ANAL_BB_TYPE_FOOT;
r_anal_aop_free (aop);
return R_ANAL_RET_END;
case R_ANAL_OP_TYPE_RET:
bb->type |= R_ANAL_BB_TYPE_LAST;
r_anal_aop_free (aop);
return R_ANAL_RET_END;
}
r_anal_aop_free (aop);
}
return bb->size;
}

View File

@ -79,6 +79,7 @@ static void r_core_anal_graph_nodes(RCore *core, RList *pbb, ut64 addr, int opts
memcpy (bbc, bbi, sizeof (RAnalBlock));
bbc->aops = NULL;
bbc->fingerprint = NULL;
bbc->cond = NULL;
r_list_append (pbb, bbc);
}
}
@ -308,7 +309,6 @@ R_API void r_core_anal_refs(RCore *core, ut64 addr, int gv) {
RListIter *iter, *iter2;
RAnalRef *fcnr;
RAnalFcn *fcni;
const char *name;
if (gv) r_cons_printf ("digraph code {\n"
"\tgraph [bgcolor=white];\n"