]> granicus.if.org Git - graphviz/commitdiff
free some allocated memory prior to exiting dijkstra
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 28 Apr 2021 03:58:44 +0000 (20:58 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 5 May 2021 00:54:32 +0000 (17:54 -0700)
This is not strictly necessary, but aids debugging with tools like Valgrind.

cmd/tools/dijkstra.c

index f136c083ec3d4f5f237ed47502c2f1a6b12fcafd..753c4f55255e28b09d20c83e1d250f9ae97f0083 100644 (file)
@@ -301,5 +301,7 @@ int main(int argc, char **argv)
        agclose(g);
        i++;
     }
+    free(Nodes);
+    free(Files);
     exit(code);
 }