fix new[]/delete mismatches and a memory leak in USER-DIFFRACTION package

This commit is contained in:
Axel Kohlmeyer 2018-12-07 05:51:02 -05:00
parent 20eca799b1
commit f8da830c07
3 changed files with 4 additions and 2 deletions

View File

@ -281,7 +281,7 @@ ComputeSAED::~ComputeSAED()
{
memory->destroy(vector);
memory->destroy(store_tmp);
delete ztype;
delete[] ztype;
}
/* ---------------------------------------------------------------------- */

View File

@ -247,7 +247,7 @@ ComputeXRD::~ComputeXRD()
{
memory->destroy(array);
memory->destroy(store_tmp);
delete ztype;
delete[] ztype;
}
/* ---------------------------------------------------------------------- */

View File

@ -287,6 +287,8 @@ FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) :
FixSAEDVTK::~FixSAEDVTK()
{
delete [] extlist;
delete [] filename;
delete [] ids;
memory->destroy(vector);
memory->destroy(vector_total);
if (fp && me == 0) fclose(fp);