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) {
SimulateVisitor simvis;
AstNode* clone = nodep->cloneTree(true);
simvis.mainCheckTree(clone);
return simvis.optimizable();
SimulateVisitor simvis;
AstNode* clonep = nodep->cloneTree(true);
simvis.mainCheckTree(clonep);
pushDeletep(clonep); clonep = NULL;
return simvis.optimizable();
}
bool simulateTree(AstNode *nodep, const V3Number *loopValue, AstNode *dtypep, V3Number &outNum) {