cgen: free temporary channel arrays (#8324)

pull/8325/head
Emily Hudson 2021-01-24 13:02:17 -06:00 committed by GitHub
parent 29d6e40f29
commit 2e695a8e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -3755,6 +3755,10 @@ fn (mut g Gen) select_expr(node ast.SelectExpr) {
g.write('-1')
}
g.writeln(');')
// free the temps that were created
g.writeln('array_free(&$objs_array);')
g.writeln('array_free(&$directions_array);')
g.writeln('array_free(&$chan_array);')
mut i := 0
for j in 0 .. node.branches.len {
if j > 0 {