]> granicus.if.org Git - graphviz/commitdiff
dot.demo/neatopack.c: add missing free of connected components subgraphs
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 6 Jul 2022 07:46:19 +0000 (09:46 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 25 Jul 2022 18:24:49 +0000 (20:24 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1800.

dot.demo/neatopack.c

index f7db2af115c47c9e959f5358d2e321af9a54a54c..7df4dd68fd4cb774fccdc229cfbb02c61504139b 100644 (file)
@@ -12,6 +12,7 @@
 #include <graphviz/pack.h>
 #include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 int main(int argc, char *argv[]) {
   GVC_t *gvc = gvContext();
@@ -43,6 +44,7 @@ int main(int argc, char *argv[]) {
     gvFreeLayout(gvc, sg);
     agdelete(g, sg);
   }
+  free(cc);
 
   agclose(g);