diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index bf66ea550a..a79d919d64 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -594,9 +594,9 @@ void PairComb3::read_file(char *file) int params_per_line = 74; char **words = new char*[params_per_line+1]; - if (params) delete [] params; + memory->sfree(params); params = NULL; - nparams = 0; + nparams = maxparam = 0; // open file on proc 0 @@ -656,9 +656,9 @@ void PairComb3::read_file(char *file) if ((ptr = strchr(line,'#'))) *ptr = '\0'; nwords = atom->count_words(line); } - if (nwords != params_per_line){ + if (nwords != params_per_line) { error->all(FLERR,"Incorrect format in COMB3 potential file"); -} + } // words = ptrs to all words in line nwords = 0;