From: Matthew Fernandez Date: Fri, 14 Oct 2022 04:01:28 +0000 (-0700) Subject: common initAnchor: fix unchecked allocation failure X-Git-Tag: 7.0.0~4^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d33e6e2eb514aa0ced9da07daecea0b705c87bbb;p=graphviz common initAnchor: fix unchecked allocation failure --- diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 960801f73..47e2a9133 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -391,7 +392,7 @@ initAnchor(GVJ_t * job, htmlenv_t * env, htmldata_t * data, boxf b, if (!id || !*id) { /* no external id, so use the internal one */ agxbinit(&xb, SMALLBUF, buf); if (!env->objid) { - env->objid = strdup(getObjId(job, obj->u.n, &xb)); + env->objid = gv_strdup(getObjId(job, obj->u.n, &xb)); env->objid_set = true; } agxbprint(&xb, "%s_%d", env->objid, anchorId++);