Fix memory leak while running Dijkstra's algorithm.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 15 Jan 2011 22:00:26 +0000 (23:00 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 15 Jan 2011 22:00:26 +0000 (23:00 +0100)
src/graph.c

index 216f9de2754d054213bc08ee25892fba171bc6d9..f9434cad15241de0aafb0828bb626ba3ebe22e1f 100644 (file)
@@ -160,7 +160,7 @@ void sssp_dijkstra(void) {
                /* Mark this node as visited and remove it from the todo_list */
 
                n->status.visited = true;
-               list_unlink_node(todo_list, nnode);
+               list_delete_node(todo_list, nnode);
 
                /* Update distance of neighbours and add them to the todo_list */