mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-05 20:50:06 +00:00
core/graph: fix mem leak
This commit is contained in:
parent
eddf4ee678
commit
1e377950c4
@ -1511,8 +1511,13 @@ static void create_edge_from_dummies(const RAGraph *g, RANode *an, RList *toremo
|
|||||||
RGraphNode *from = r_list_get_n (r_graph_innodes (g->graph, n), 0);
|
RGraphNode *from = r_list_get_n (r_graph_innodes (g->graph, n), 0);
|
||||||
RANode *a_from = get_anode (from);
|
RANode *a_from = get_anode (from);
|
||||||
RListIter *(*add_to_list)(RList *, void *) = NULL;
|
RListIter *(*add_to_list)(RList *, void *) = NULL;
|
||||||
AEdge *e = R_NEW0 (AEdge);
|
AEdge *e;
|
||||||
if (!e || !a_from) {
|
if (!a_from) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
e = R_NEW0 (AEdge);
|
||||||
|
if (!e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e->x = r_list_new ();
|
e->x = r_list_new ();
|
||||||
|
Loading…
Reference in New Issue
Block a user