1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-07-12 23:00:55 +02:00

fix: close file (#1274)

This commit is contained in:
guoguangwu
2024-06-12 23:17:57 +08:00
committed by GitHub
parent e4bf5e93fb
commit 27d9ebad38

View File

@ -66,6 +66,7 @@ func StringSliceFile(s *[]string, filepath string) error {
if err != nil { if err != nil {
return fmt.Errorf("Can't open file %s\n", filepath) return fmt.Errorf("Can't open file %s\n", filepath)
} }
defer f.Close()
scanner := bufio.NewScanner(f) scanner := bufio.NewScanner(f)
for scanner.Scan() { for scanner.Scan() {