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

index 5b8d5e2c502c9dfc1b8161ab00f510bf141a6982..6bd078e0230ae5ff0690ebd22f065c646c679f1c 100644 (file)
@@ -246,7 +246,7 @@ static gboolean gl_main_expose(gpointer data)
 static void get_data_dir(void)
 {
     free(view->template_file);
-    view->template_file = strdup(smyrnaPath("template.dot"));
+    view->template_file = gv_strdup(smyrnaPath("template.dot"));
 }
 
 void init_viewport(ViewInfo * view)