]> granicus.if.org Git - graphviz/commitdiff
common pos_html_cell: fix unchecked allocation failure
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 Oct 2022 04:01:46 +0000 (21:01 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 19 Oct 2022 02:18:49 +0000 (19:18 -0700)
lib/common/htmltable.c

index 47e2a9133d9f8b56c1d5f8bb62a36ad64e41eecf..1520325e8cb2b426ed47038166f791b63444a590 100644 (file)
@@ -1530,7 +1530,7 @@ static void pos_html_cell(htmlcell_t * cp, boxf pos, int sides)
     boxf cbox;
 
     if (!cp->data.pencolor && cp->parent->data.pencolor)
-       cp->data.pencolor = strdup(cp->parent->data.pencolor);
+       cp->data.pencolor = gv_strdup(cp->parent->data.pencolor);
 
     /* If fixed, align cell */
     if (cp->data.flags & FIXED_FLAG) {