]> granicus.if.org Git - graphviz/commitdiff
prune: fix memory leak of list memory
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Nov 2022 16:07:33 +0000 (09:07 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Nov 2022 04:47:29 +0000 (20:47 -0800)
This code was losing the backing memory of the list data itself.

contrib/prune/prune.c

index 04f18d9b6706c5654d2dd6196b4f95ec1a6404ad..32b312ee6a28731fa2be6bd41674b1420ceef331 100644 (file)
@@ -183,8 +183,8 @@ int main(int argc, char **argv)
        agwrite(graph, stdout);
        agclose(graph);
     }
-    free(attr_list);
-    free(node_list);
+    free_generic_list(attr_list);
+    free_generic_list(node_list);
     graphviz_exit(EXIT_SUCCESS);
 }