Plug memory leaks (#5016)

This commit is contained in:
Geza Lore
2024-03-23 22:12:43 +00:00
committed by GitHub
parent 38ad328956
commit 9b729b80e0
16 changed files with 70 additions and 29 deletions
+2 -1
View File
@@ -80,7 +80,8 @@ class LinkResolveVisitor final : public VNVisitor {
// Initial assignments under function/tasks can just be simple
// assignments without the initial
if (m_ftaskp) {
VL_DO_DANGLING(nodep->replaceWith(nodep->stmtsp()->unlinkFrBackWithNext()), nodep);
nodep->replaceWith(nodep->stmtsp()->unlinkFrBackWithNext());
VL_DO_DANGLING(pushDeletep(nodep), nodep);
}
}
void visit(AstNodeCoverOrAssert* nodep) override {