From: Matthew Fernandez Date: Sat, 17 Sep 2022 00:41:46 +0000 (-0700) Subject: glcomp glCompLabelNew: fix unchecked allocation failure X-Git-Tag: 6.0.2~33^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4526500af11eb5681b271947398027aab8af794e;p=graphviz glcomp glCompLabelNew: fix unchecked allocation failure --- diff --git a/lib/glcomp/glcomplabel.c b/lib/glcomp/glcomplabel.c index 0642925b5..fb5ad4e55 100644 --- a/lib/glcomp/glcomplabel.c +++ b/lib/glcomp/glcomplabel.c @@ -22,7 +22,7 @@ glCompLabel *glCompLabelNew(glCompObj * par, GLfloat x, GLfloat y, p->objType = glLabelObj; p->transparent=1; - p->text = strdup(text); + p->text = gv_strdup(text); p->common.font = glNewFontFromParent ((glCompObj*)p, text); p->common.functions.draw = (glcompdrawfunc_t)glCompLabelDraw;