forked from lijiext/lammps
fix new[]/delete mismatches and a memory leak in USER-DIFFRACTION package
This commit is contained in:
parent
20eca799b1
commit
f8da830c07
|
@ -281,7 +281,7 @@ ComputeSAED::~ComputeSAED()
|
|||
{
|
||||
memory->destroy(vector);
|
||||
memory->destroy(store_tmp);
|
||||
delete ztype;
|
||||
delete[] ztype;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -247,7 +247,7 @@ ComputeXRD::~ComputeXRD()
|
|||
{
|
||||
memory->destroy(array);
|
||||
memory->destroy(store_tmp);
|
||||
delete ztype;
|
||||
delete[] ztype;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue