fix memory leak

This commit is contained in:
CiD- committed 2022-03-15 11:47:35 -04:00
1 parent 6d6e840bc2
commit 36c22393a4
2 files changed
+16 -1

No files matched your search

+2 -1
View File
@@ -112,7 +112,8 @@ _remove_all :: proc(path: string) -> Error {
loop: for {
res := unix.sys_getdents64(int(dfd), &buf[0], n)
switch res {
case -22: //-EINVAL
case -EINVAL:
delete(buf)
n *= 2
buf = make([]u8, n)
continue loop