]> granicus.if.org Git - graphviz/commitdiff
smyrna loadGraph: fix unchecked allocation failure
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Oct 2022 18:00:18 +0000 (11:00 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 19 Oct 2022 04:30:58 +0000 (21:30 -0700)
cmd/smyrna/viewport.c

index 6bd078e0230ae5ff0690ebd22f065c646c679f1c..4263431ae624a6823ecb0098c98c16343dbe0b71 100644 (file)
@@ -436,7 +436,7 @@ static Agraph_t *loadGraph(char *filename)
        agclose (g);
        return 0;
     }
-    view->Topview->Graphdata.GraphFileName = strdup(filename);
+    view->Topview->Graphdata.GraphFileName = gv_strdup(filename);
     return g;
 }