From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: fdpgen deriveGraph: use cgraph wrapper for allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d03e3164a3ddcd65f80faea376a61fa557d2b0c;p=graphviz fdpgen deriveGraph: use cgraph wrapper for allocation 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. --- diff --git a/lib/fdpgen/layout.c b/lib/fdpgen/layout.c index 66d5fc3ab..8250ab9c0 100644 --- a/lib/fdpgen/layout.c +++ b/lib/fdpgen/layout.c @@ -403,7 +403,7 @@ static graph_t *deriveGraph(graph_t * g, layout_info * infop) dg = agopen("derived", Agstrictdirected,NULL); agbindrec(dg, "Agraphinfo_t", sizeof(Agraphinfo_t), true); - GD_alg(dg) = NEW(gdata); /* freed in freeDeriveGraph */ + GD_alg(dg) = gv_alloc(sizeof(gdata)); // freed in freeDeriveGraph #ifdef DEBUG GORIG(dg) = g; #endif