plug small memory leak

This commit is contained in:
Axel Kohlmeyer 2020-01-07 15:32:44 -05:00
parent f8ad7cc90f
commit 23b73a0ebc
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 2 additions and 5 deletions

View File

@ -459,11 +459,8 @@ void PairLJCutIntel::ForceConst<flt_t>::set_ntypes(const int ntypes,
const int cop) {
if (ntypes != _ntypes) {
if (_ntypes > 0) {
fc_packed1 *oljc12o = ljc12o[0];
fc_packed2 *olj34 = lj34[0];
_memory->destroy(oljc12o);
_memory->destroy(olj34);
_memory->destroy(ljc12o);
_memory->destroy(lj34);
}
if (ntypes > 0) {
_cop = cop;