mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-26 07:44:29 +00:00
* 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:
parent
23ad3d2415
commit
9e49939dab
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user