memory leak

This commit is contained in:
Jacob Gissinger
2021-08-27 17:03:11 -04:00
parent 4089d7757d
commit 90f82a8ef1

View File

@ -1990,7 +1990,10 @@ int FixBondReact::check_constraints()
*ptr = satisfied[i] ? '1' : '0';
}
double verdict = input->variable->evaluate_boolean(evalstr);
if (verdict == 0.0) return 0;
if (verdict == 0.0) {
memory->destroy(satisfied);
return 0;
}
}
// let's also check chirality within 'check_constraint'
@ -2012,7 +2015,10 @@ int FixBondReact::check_constraints()
}
}
}
if (get_chirality(my4coords) != chiral_atoms[i][1][rxnID]) return 0;
if (get_chirality(my4coords) != chiral_atoms[i][1][rxnID]) {
memory->destroy(satisfied);
return 0;
}
}
}