Replace most strdup with gmx_strdup
[alexxy/gromacs.git] / src / gromacs / topology / symtab.cpp
index 763d6f4f4241567bac51d37779eb86b429c475e4..98a99e3a9a82147b4dbf0ac1c3019e4ae996e6e5 100644 (file)
@@ -166,7 +166,7 @@ static char **enter_buf(t_symtab *symtab, char *name)
             if (symbuf->buf[i] == NULL)
             {
                 symtab->nr++;
-                symbuf->buf[i] = strdup(name);
+                symbuf->buf[i] = gmx_strdup(name);
                 return &(symbuf->buf[i]);
             }
             else if (strcmp(symbuf->buf[i], name) == 0)
@@ -190,7 +190,7 @@ static char **enter_buf(t_symtab *symtab, char *name)
     symbuf       = symbuf->next;
 
     symtab->nr++;
-    symbuf->buf[0] = strdup(name);
+    symbuf->buf[0] = gmx_strdup(name);
     return &(symbuf->buf[0]);
 }