From: Matthew Fernandez Date: Sun, 4 Sep 2022 19:35:51 +0000 (-0700) Subject: GD plugin vrml_begin_job: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~9^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e05bf1f4b6509c8fa458baf602d2375ac7d6655e;p=graphviz GD plugin vrml_begin_job: 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/plugin/gd/gvrender_gd_vrml.c b/plugin/gd/gvrender_gd_vrml.c index 8c78e74a3..a9f76a12d 100644 --- a/plugin/gd/gvrender_gd_vrml.c +++ b/plugin/gd/gvrender_gd_vrml.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -55,7 +56,7 @@ typedef struct { } state_t; static void vrml_begin_job(GVJ_t *job) { - job->context = zmalloc(sizeof(state_t)); + job->context = gv_alloc(sizeof(state_t)); } static void vrml_end_job(GVJ_t *job) {