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

os: fix a memory leak in File.write(string)

This commit is contained in:
Alexander Medvednikov 2019-07-24 22:47:06 +02:00
parent d2b33397cc
commit 299d41e3b9

View File

@ -263,9 +263,7 @@ pub fn open_append(path string) ?File {
}
pub fn (f File) write(s string) {
ss := s.clone() // TODO is clone() needed here?
C.fputs(ss.str, f.cfile)
// ss.free()
C.fputs(s.str, f.cfile)
// C.fwrite(s.str, 1, s.len, f.cfile)
}