From: Matthew Fernandez Date: Fri, 2 Sep 2022 00:59:12 +0000 (-0700) Subject: smyrna Render_Contour2: fix unchecked allocation failure X-Git-Tag: 6.0.1~13^2~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ac916bc7578321f910509b5662522c8335ce12e;p=graphviz smyrna Render_Contour2: fix unchecked allocation failure --- diff --git a/cmd/smyrna/polytess.c b/cmd/smyrna/polytess.c index de84563d4..c1b2ccaef 100644 --- a/cmd/smyrna/polytess.c +++ b/cmd/smyrna/polytess.c @@ -77,7 +77,7 @@ static void Set_Winding_Rule(GLUtesselator *tobj, GLenum winding_rule) static void Render_Contour2(GLUtesselator *tobj, sdot_op* p) { - GLdouble* d = calloc(p->op.u.polygon.cnt * 3, sizeof(GLdouble)); + GLdouble *d = gv_calloc(p->op.u.polygon.cnt * 3, sizeof(GLdouble)); for (size_t x = 0; x < p->op.u.polygon.cnt; x++) { d[x * 3] = p->op.u.polygon.pts[x].x;