fix resource leak of *os.File

This commit is contained in:
fooofei 2020-10-04 10:38:30 +08:00
parent bc8c5db898
commit 5a0ec9431f
1 changed files with 1 additions and 0 deletions

View File

@ -241,6 +241,7 @@ func RandomFileName() (fname string, err error) {
return
}
fname = f.Name()
_ = f.Close()
return
}