mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: fix a leak
This commit is contained in:
parent
d2c508e9a9
commit
3f59f23427
@ -65,8 +65,11 @@ fn (mut ctx Context) send_response_to_client(mimetype string, res string) bool {
|
|||||||
sb.write('\r\n')
|
sb.write('\r\n')
|
||||||
sb.write(headers_close)
|
sb.write(headers_close)
|
||||||
sb.write(res)
|
sb.write(res)
|
||||||
ctx.conn.send_string(sb.str()) or { return false }
|
s := sb.str()
|
||||||
//sb.free()
|
defer {
|
||||||
|
s.free()
|
||||||
|
}
|
||||||
|
ctx.conn.send_string(s) or { return false }
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user