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 216f9de..f9434ca 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 */