mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nv50/ir: fix leak in removal of graph root
This commit is contained in:
parent
d5cfab703b
commit
e3a3844e8d
1 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue