Fix memory leak

This commit is contained in:
Stan Gerald Moore
2024-02-27 14:50:20 -07:00
parent 7593f0df22
commit 4dbfa5483b
2 changed files with 6 additions and 3 deletions

View File

@ -2468,8 +2468,10 @@ void CommTiled::deallocate_swap(int n)
delete [] maxsendlist[i];
for (int j = 0; j < nprocmax[i]; j++) memory->destroy(sendlist[i][j]);
delete [] sendlist[i];
if (sendlist && sendlist[i]) {
for (int j = 0; j < nprocmax[i]; j++) memory->destroy(sendlist[i][j]);
delete [] sendlist[i];
}
}
delete [] sendproc;