mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
Fix fd leak in debugprintln
This commit is contained in:
parent
a5ea12757e
commit
d46590c2e6
1 changed files with 1 additions and 0 deletions
|
|
@ -345,6 +345,7 @@ func DebugPrintln(a ...any) {
|
|||
if fd, err := strconv.Atoi(fds); err == nil && fd > -1 {
|
||||
if f := os.NewFile(uintptr(fd), "<kitty_stdout>"); f != nil {
|
||||
fmt.Fprintln(f, a...)
|
||||
f.Close()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue