mirror of https://github.com/schollz/croc.git
fix resource leak of *os.File
This commit is contained in:
parent
bc8c5db898
commit
5a0ec9431f
|
@ -241,6 +241,7 @@ func RandomFileName() (fname string, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fname = f.Name()
|
fname = f.Name()
|
||||||
|
_ = f.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue