Unverified Commit 7968d2ed authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1155 from athomps/sna-atom-leakfix2

Fixed a segfault introduced by memory-leak fix (#1125)
parents 382e91cf c142288e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -113,7 +113,8 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
    } else error->all(FLERR,"Illegal compute snad/atom command");
  }

  snaptr = new SNA*[comm->nthreads];
  nthreads = comm->nthreads;
  snaptr = new SNA*[nthreads];
#if defined(_OPENMP)
#pragma omp parallel default(none) shared(lmp,rfac0,twojmax,rmin0,switchflag,bzeroflag)
#endif
+2 −1
Original line number Diff line number Diff line
@@ -109,7 +109,8 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
    } else error->all(FLERR,"Illegal compute snav/atom command");
  }

  snaptr = new SNA*[comm->nthreads];
  nthreads = comm->nthreads;
  snaptr = new SNA*[nthreads];
#if defined(_OPENMP)
#pragma omp parallel default(none) shared(lmp,rfac0,twojmax,rmin0,switchflag,bzeroflag)
#endif