]> granicus.if.org Git - graphviz/commitdiff
neatogen embed_graph: fix memory leak of queue
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 22 Dec 2022 03:08:15 +0000 (19:08 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 25 Dec 2022 01:17:08 +0000 (17:17 -0800)
Every call to `mkQueue` is intended to be paired with a call to `freeQueue`.
This function was missing its call to the free function.

lib/neatogen/embed_graph.c

index b1d4c222b42ddbbd2d8fd8a1bc9a641437e99cbd..47d56591eb97273b2bd61a281d5d7d877156ceb0 100644 (file)
@@ -91,6 +91,7 @@ void embed_graph(vtx_data * graph, int n, int dim, DistType *** Coords,
     }
 
     free(dist);
+    freeQueue(&Q);
 
     if (reweight_graph) {
        restore_old_weights(graph, n, old_weights);