From 9414af20a9f25bcc0cefb084b16c957a7b77a185 Mon Sep 17 00:00:00 2001 From: camelto2 Date: Tue, 5 Oct 2021 17:28:37 -0600 Subject: [PATCH] fix libxml leak --- src/QMCTools/QMCGaussianParserBase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/QMCTools/QMCGaussianParserBase.cpp b/src/QMCTools/QMCGaussianParserBase.cpp index e6872522c3..0d4717c86b 100644 --- a/src/QMCTools/QMCGaussianParserBase.cpp +++ b/src/QMCTools/QMCGaussianParserBase.cpp @@ -1829,7 +1829,10 @@ void QMCGaussianParserBase::dump(const std::string& psi_tag, const std::string& { createSPOSetsH5(spoupPtr, spodnPtr); xmlAddChild(detPtr, spoupPtr); - if (!isSpinor) + //for spinors, we don't need the spodn so just free it + if (isSpinor) + xmlFreeNode(spodnPtr); + else xmlAddChild(detPtr, spodnPtr); xmlNodePtr multislaterdetPtr = NULL; if (usingCSF)