Fix memory leaks - batch 3 (#6419)

This commit is contained in:
Geza Lore
2025-09-11 12:01:36 +01:00
committed by GitHub
parent f1396fbced
commit 56927fb955
26 changed files with 112 additions and 51 deletions
+1
View File
@@ -1939,6 +1939,7 @@ class RandomizeVisitor final : public VNVisitor {
AstVar* const randcVarp = newRandcVarsp(memberVarp);
AstVarRef* const refp = new AstVarRef{fl, classp, memberVarp, VAccess::WRITE};
AstNodeStmt* const stmtp = newRandStmtsp(fl, refp, randcVarp, basicFvarp);
if (!refp->backp()) VL_DO_DANGLING(refp->deleteTree(), refp);
basicRandomizep->addStmtsp(new AstBegin{fl, "", stmtp});
}
});