mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
fix resource leak of *os.File
This commit is contained in:
parent
bc8c5db898
commit
5a0ec9431f
1 changed files with 1 additions and 0 deletions
|
@ -241,6 +241,7 @@ func RandomFileName() (fname string, err error) {
|
|||
return
|
||||
}
|
||||
fname = f.Name()
|
||||
_ = f.Close()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue