Fix various small node leaks.

This commit is contained in:
Wilson Snyder 2018-03-10 14:10:41 -05:00
parent 54a101acbe
commit 0a1b775ed6

View File

@ -185,10 +185,11 @@ private:
} }
bool canSimulate(AstNode *nodep) { bool canSimulate(AstNode *nodep) {
SimulateVisitor simvis; SimulateVisitor simvis;
AstNode* clone = nodep->cloneTree(true); AstNode* clonep = nodep->cloneTree(true);
simvis.mainCheckTree(clone); simvis.mainCheckTree(clonep);
return simvis.optimizable(); pushDeletep(clonep); clonep = NULL;
return simvis.optimizable();
} }
bool simulateTree(AstNode *nodep, const V3Number *loopValue, AstNode *dtypep, V3Number &outNum) { bool simulateTree(AstNode *nodep, const V3Number *loopValue, AstNode *dtypep, V3Number &outNum) {