]> granicus.if.org Git - graphviz/commitdiff
glcomp glCompLabelNew: fix unchecked allocation failure
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 17 Sep 2022 00:41:46 +0000 (17:41 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Sep 2022 00:17:10 +0000 (17:17 -0700)
lib/glcomp/glcomplabel.c

index 0642925b5e35cb5c901666fd3c69d7aba6a24256..fb5ad4e555c34fd388a68fd418de11446e51ff9a 100644 (file)
@@ -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;