mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 18:42:58 +02:00
Fix memory leaks - batch 2 (#6417)
This commit is contained in:
@@ -125,6 +125,7 @@ class DfgRegularize final {
|
||||
// If it's an inlined expression, repalce the VarRef entirely
|
||||
if (AstNodeExpr* const newp = VN_CAST(replacementp, NodeExpr)) {
|
||||
refp->replaceWith(newp->cloneTreePure(false));
|
||||
VL_DO_DANGLING(refp->deleteTree(), refp);
|
||||
return;
|
||||
}
|
||||
// Otherwise just re-point the VarRef to the new variable
|
||||
|
||||
Reference in New Issue
Block a user