variable substitution memory leak

This commit is contained in:
Steve Plimpton
2023-02-09 11:14:16 -07:00
parent f9be11ac8a
commit b4b3d47783

View File

@ -76,7 +76,7 @@ MDIPlugin::MDIPlugin(LAMMPS *_lmp, int narg, char **arg) : Pointers(_lmp)
iarg += 2;
} else if (strcmp(arg[iarg], "command") == 0) {
if (iarg + 2 > narg) error->all(FLERR, "Illegal mdi plugin command");
lammps_command = utils::strdup(arg[iarg + 1]);
lammps_command = arg[iarg + 1];
// do variable substitution in multiple word lammps_command