From 26643c8d7f1595a36533a2c8c2718b03d6606aaf Mon Sep 17 00:00:00 2001 From: Slaven Peles Date: Tue, 11 Jun 2024 17:30:58 -0400 Subject: [PATCH] Fix alloc/free new/delete inconsistency. --- resolve/LinSolverDirectLUSOL.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/resolve/LinSolverDirectLUSOL.cpp b/resolve/LinSolverDirectLUSOL.cpp index 3f379848..8a9ce4ad 100644 --- a/resolve/LinSolverDirectLUSOL.cpp +++ b/resolve/LinSolverDirectLUSOL.cpp @@ -69,20 +69,20 @@ namespace ReSolve delete U_; delete[] P_; delete[] Q_; - free(a_); - free(indc_); - free(indr_); - free(p_); - free(q_); - free(lenc_); - free(lenr_); - free(locc_); - free(locr_); - free(iploc_); - free(iqloc_); - free(ipinv_); - free(iqinv_); - free(w_); + delete[] a_; + delete[] indc_; + delete[] indr_; + delete[] p_; + delete[] q_; + delete[] lenc_; + delete[] lenr_; + delete[] locc_; + delete[] locr_; + delete[] iploc_; + delete[] iqloc_; + delete[] ipinv_; + delete[] iqinv_; + delete[] w_; L_ = U_ = nullptr; P_ = Q_ = indc_ = indr_ = p_ = q_ = lenc_ = lenr_ = locc_ = locr_ = iploc_ = iqloc_ = ipinv_ = iqinv_ = nullptr;