Replace most strdup with gmx_strdup
[alexxy/gromacs.git] / src / programs / view / manager.cpp
index 30f7a31a2ff32b575bea8504101e412e30e92d0b..391dadaf9102a3d2043e51e855bc67a182d5c57c 100644 (file)
@@ -230,7 +230,7 @@ void set_file(t_x11 *x11, t_manager *man, const char *trajectory,
     man->natom =
         read_first_x(man->oenv, &man->status, trajectory, &(man->time), &(man->x),
                      man->box);
-    man->trajfile = strdup(trajectory);
+    man->trajfile = gmx_strdup(trajectory);
     if (man->natom > man->top.atoms.nr)
     {
         gmx_fatal(FARGS, "Topology %s (%d atoms) and trajectory %s (%d atoms) "
@@ -240,7 +240,7 @@ void set_file(t_x11 *x11, t_manager *man, const char *trajectory,
 
     cool_quote(quote, 255, NULL);
     sprintf(buf, "%s: %s", *man->top.name, quote);
-    man->title.text = strdup(buf);
+    man->title.text = gmx_strdup(buf);
     man->view       = init_view(man->box);
     at              = &(man->top.atoms);
     aps             = gmx_atomprop_init();