Skip to content

Commit

Permalink
Better leak than double free
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Mar 21, 2024
1 parent 86e0f2c commit a5ef4bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libr/core/agraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -4559,8 +4559,7 @@ R_API bool r_core_visual_graph(RCore *core, RAGraph *g, RAnalFunction *_fcn, int
if (root) {
RGraph *dg = r_graph_dom_tree (g->graph, root);
if (dg) {
R_LOG_INFO ("pwn");
r_graph_free (g->graph);
// XXX double free - r_graph_free (g->graph);
g->graph = dg;
} else {
R_LOG_WARN ("Cannot compute the dominance tree");
Expand Down

0 comments on commit a5ef4bb

Please sign in to comment.