From: Matthew Fernandez Date: Mon, 5 Sep 2022 15:45:38 +0000 (-0700) Subject: label xlhdxload: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~8^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fc1c06c72d9e5431f5c0df2d467aa8e27a9b20b;p=graphviz label xlhdxload: 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/label/xlabels.c b/lib/label/xlabels.c index c062f30fc..4574eb334 100644 --- a/lib/label/xlabels.c +++ b/lib/label/xlabels.c @@ -9,6 +9,7 @@ *************************************************************************/ #include +#include #include #include #include @@ -546,7 +547,7 @@ static int xlhdxload(XLabels_t * xlp) HDict_t *hp; point pi; - hp = NEW(HDict_t); + hp = gv_alloc(sizeof(HDict_t)); hp->d.data = &xlp->objs[i]; hp->d.rect = objplpmks(&xlp->objs[i]);