diff options
author | Christoph Bumiller <[email protected]> | 2011-10-14 19:47:45 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-10-21 23:00:38 +0200 |
commit | e3a3844e8de7ff69606e16eab752152f70785de8 (patch) | |
tree | 4f406618bbb760f5f73ee12afea9a3b90cd4feb2 /src/gallium/drivers | |
parent | d5cfab703b1179ac6e81c6281f6e25d1cab9d4c2 (diff) |
nv50/ir: fix leak in removal of graph root
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp index e987706e415..2c64a140f51 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_graph.cpp @@ -145,16 +145,16 @@ bool Graph::Node::detach(Graph::Node *node) // Cut a node from the graph, deleting all attached edges. void Graph::Node::cut() { - if (!graph || (!in && !out)) - return; - while (out) delete out; while (in) delete in; - if (graph->root == this) - graph->root = NULL; + if (graph) { + if (graph->root == this) + graph->root = NULL; + graph = NULL; + } } Graph::Edge::Edge(Node *org, Node *tgt, Type kind) |