Skip to content

Commit 93aa907

Browse files
authored
Merge pull request #229 from denghuilu/devel-submit
fix bug of memory leak
2 parents c7f8473 + 7730cc6 commit 93aa907

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/lib/src/NNPInter.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ void NNPInter::update_nbor(const InternalNeighborList & nlist, const int nloc) {
285285
ilist_size = nlist.ilist.size();
286286
jrange_size = nlist.jrange.size();
287287
jlist_size = nlist.jlist.size();
288+
init_nbor = true;
288289
}
289290
if (ilist_size < nlist.ilist.size()) {
290291
cudaErrcheck(cudaFree(ilist));
@@ -832,6 +833,7 @@ update_nbor(const InternalNeighborList & nlist, const int nloc)
832833
ilist_size = nlist.ilist.size();
833834
jrange_size = nlist.jrange.size();
834835
jlist_size = nlist.jlist.size();
836+
init_nbor = true;
835837
}
836838
if (ilist_size < nlist.ilist.size()) {
837839
cudaErrcheck(cudaFree(ilist));

0 commit comments

Comments
 (0)