]> granicus.if.org Git - graphviz/commitdiff
gml2gv mkNode: fix unchecked allocation failure
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 28 Aug 2022 15:51:53 +0000 (08:51 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 30 Aug 2022 04:01:31 +0000 (21:01 -0700)
cmd/tools/gmlparse.y

index 1d463f321bff0b26cee48110213100c72692fa1c..bc59cf2a54d668f1dc19fd07867f89ec7a5a38d1 100644 (file)
@@ -183,7 +183,7 @@ pushG (void)
 static gmlnode*
 mkNode (void)
 {
-    gmlnode* np = NEW(gmlnode);
+    gmlnode* np = gv_alloc(sizeof(gmlnode));
     np->attrlist = dtopen (&attrDisc, Dtqueue);
     np->id = NULL;
     return np;