Skip to content

Commit

Permalink
fix libxml leak
Browse files Browse the repository at this point in the history
  • Loading branch information
camelto2 committed Oct 5, 2021
1 parent bbfe24f commit 9414af2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/QMCTools/QMCGaussianParserBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9414af2

Please sign in to comment.