]> granicus.if.org Git - graphviz/commitdiff
dotgen make_flat_adj_edges: use cgraph wrapper for allocation
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 14 Sep 2022 01:37:36 +0000 (18:37 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 14 Sep 2022 01:39:23 +0000 (18:39 -0700)
The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h
wrappers except (1) they are header-only and (2) they live in a directory
(cgraph) that is at the root of the dependency tree. The long term plan is to
replace all use of lib/common/memory.h with lib/cgraph/alloc.h.

lib/dotgen/dotsplines.c

index 99b0a7c186c32d1abad56eb05292317ceae6bdc5..f9a9f58415067332ad32f2b6a1d93eeef27f453a 100644 (file)
@@ -1317,7 +1317,7 @@ make_flat_adj_edges(graph_t* g, edge_t** edges, int ind, int cnt, edge_t* e0,
        return;
     }
 
-    attrs = NEW(attr_state_t);
+    attrs = gv_alloc(sizeof(attr_state_t));
     auxg = cloneGraph (g, attrs);
     subg = agsubg (auxg, "xxx",1);
     agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), true);