mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: check is ptr when free in closing scope (#1399)
This commit is contained in:
parent
37a0e6ebef
commit
715bd21118
@ -1029,7 +1029,7 @@ fn (p mut Parser) close_scope() {
|
||||
else if v.typ == 'string' {
|
||||
p.genln('v_string_free($v.name); // close_scope free')
|
||||
}
|
||||
else {
|
||||
else if v.ptr {
|
||||
p.genln('free($v.name); // close_scope free')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user