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:
parent
d2b33397cc
commit
299d41e3b9
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user