apply utils::strdup() in a few more cases

This commit is contained in:
Axel Kohlmeyer
2021-02-04 17:52:32 -05:00
parent 5c8bbb42f6
commit cf427bcad8
14 changed files with 83 additions and 159 deletions

View File

@ -71,9 +71,7 @@ void Set::command(int narg, char **arg)
else if (strcmp(arg[0],"region") == 0) style = REGION_SELECT;
else error->all(FLERR,"Illegal set command");
int n = strlen(arg[1]) + 1;
id = new char[n];
strcpy(id,arg[1]);
id = utils::strdup(arg[1]);
select = nullptr;
selection(atom->nlocal);