From 9b65f085f9d489d707360a7328177b4a5b7e549b Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Sat, 29 Dec 2018 19:31:52 -0500 Subject: [PATCH] Free more memory in constraints cleanup Plug several end-of-MD memory leaks Change-Id: I54c73723b0b4618eb3747be36ae848fcaa015551 --- src/gromacs/mdlib/constr.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gromacs/mdlib/constr.cpp b/src/gromacs/mdlib/constr.cpp index 0a20f8baaf..8fb124001a 100644 --- a/src/gromacs/mdlib/constr.cpp +++ b/src/gromacs/mdlib/constr.cpp @@ -1122,6 +1122,18 @@ Constraints::Impl::Impl(const gmx_mtop_t &mtop_p, Constraints::Impl::~Impl() { + if (bSettleErrorHasOccurred != nullptr) + { + sfree(bSettleErrorHasOccurred); + } + if (vir_r_m_dr_th != nullptr) + { + sfree(vir_r_m_dr_th); + } + if (settled != nullptr) + { + settle_free(settled); + } done_lincs(lincsd); } -- 2.11.4.GIT