]> granicus.if.org Git - graphviz/commitdiff
gml2gv pushG: fix unchecked allocation failuregml2gv pushG: fix unchecked allocation...
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 28 Aug 2022 15:51:21 +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 77cc819db39330aa39df298d5a4d22a04dc4b073..1d463f321bff0b26cee48110213100c72692fa1c 100644 (file)
@@ -23,6 +23,7 @@
 #include <gml2gv.h>
 #include <agxbuf.h>
 #include <assert.h>
+#include <cgraph/alloc.h>
 #include <cgraph/exit.h>
 #include <cgraph/stack.h>
 
@@ -164,7 +165,7 @@ popG (void)
 static void
 pushG (void)
 {
-    gmlgraph* g = NEW(gmlgraph);
+    gmlgraph* g = gv_alloc(sizeof(gmlgraph));
 
     g->attrlist = dtopen(&attrDisc, Dtqueue);
     g->nodelist = dtopen(&nodeDisc, Dtqueue);