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

index d66a2b9465c4c912f2e8bee7684ef1ed8bc5fcf2..a763e85fe2da4a02d1776c8880d33344b5fbc704 100644 (file)
@@ -92,7 +92,7 @@ glCompFont *glNewFontFromParent(glCompObj * o, char *text)
 
        font->type = parent->font->type;
        font->glutfont = parent->font->glutfont;
-       font->fontdesc = strdup(parent->font->fontdesc);
+       font->fontdesc = gv_strdup(parent->font->fontdesc);
        font->size = parent->font->size;
        font->transparent = parent->font->transparent;
        font->justify.VJustify = parent->font->justify.VJustify;