Skip to content

Commit

Permalink
fix double free
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 26, 2024
1 parent 2b0af6d commit 0cc4cc9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vlib/v/gen/c/cgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -3386,6 +3386,9 @@ fn (mut g Gen) autofree_scope_vars2(scope &ast.Scope, start_pos int, end_pos int
// Do not free vars that were declared after this scope
continue
}
if obj.expr is ast.IfGuardExpr {
continue
}
g.autofree_variable(obj)
}
else {}
Expand Down

0 comments on commit 0cc4cc9

Please sign in to comment.