initialize/reset more unallocated pointer variables to NULL

This commit is contained in:
Axel Kohlmeyer 2019-10-08 02:41:35 -04:00
parent ac82f78667
commit 1f372e27e9
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 12 additions and 0 deletions

View File

@ -61,6 +61,10 @@ PairBOP::PairBOP(LAMMPS *lmp) : Pair(lmp)
manybody_flag = 1;
ghostneigh = 1;
BOP_index = NULL;
BOP_index3 = NULL;
BOP_total = NULL;
BOP_total3 = NULL;
map = NULL;
pi_a = NULL;
pro_delta = NULL;
@ -102,6 +106,8 @@ PairBOP::PairBOP(LAMMPS *lmp) : Pair(lmp)
rij = NULL;
neigh_index = NULL;
neigh_index3 = NULL;
neigh_flag = NULL;
neigh_flag3 = NULL;
cosAng = NULL;
betaS = NULL;
dBetaS = NULL;
@ -5798,6 +5804,12 @@ void PairBOP::memory_theta_destroy()
memory->destroy(neigh_flag3);
memory->destroy(neigh_index);
memory->destroy(neigh_index3);
itypeSigBk = NULL;
itypePiBk = NULL;
neigh_flag = NULL;
neigh_flag3 = NULL;
neigh_index = NULL;
neigh_index3 = NULL;
if(otfly==0) {
memory->destroy(cosAng);
memory->destroy(dcAng);