* Revert wrong "bb memory leak" fix (again xD)

- RAnalBlock must keep a list of the analyzed opcodes
  - Those RAnalOp are not freed because they are added to this list
This commit is contained in:
Nibble 2010-06-17 10:04:51 +02:00
parent 23ad3d2415
commit 9e49939dab
2 changed files with 1 additions and 5 deletions

View File

@ -75,23 +75,18 @@ R_API int r_anal_bb(RAnal *anal, RAnalBlock *bb, ut64 addr, ut8 *buf, ut64 len,
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

@ -77,6 +77,7 @@ static void r_core_anal_graph_nodes(RCore *core, RList *pbb, ut64 addr, int opts
bbc = R_NEW (RAnalBlock);
if (bbc) {
memcpy (bbc, bbi, sizeof (RAnalBlock));
/* We don't want to free this refs when the temporary list is destroyed */
bbc->aops = NULL;
bbc->fingerprint = NULL;
bbc->cond = NULL;