1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: check unsafe V function calls (#8752)

This commit is contained in:
Nick Treleaven
2021-02-14 18:31:42 +00:00
committed by GitHub
parent d3bcd5d305
commit ea803113c3
36 changed files with 200 additions and 161 deletions

View File

@@ -132,7 +132,7 @@ pub fn (mut ctx Context) send_response_to_client(mimetype string, res string) bo
}
s := sb.str()
defer {
s.free()
unsafe { s.free() }
}
send_string(mut ctx.conn, s) or { return false }
return true
@@ -439,7 +439,7 @@ fn handle_conn<T>(mut conn net.TcpConn, mut app T) {
return
}
app.send_response_to_client(mime_type, data)
data.free()
unsafe { data.free() }
return
}
app.init()