diff --git a/cmd/wayback/wayback.go b/cmd/wayback/wayback.go index 53055121..1ac3cc2b 100644 --- a/cmd/wayback/wayback.go +++ b/cmd/wayback/wayback.go @@ -143,6 +143,7 @@ func readFromFile(s string) (urls []*url.URL) { if err != nil { return } + defer file.Close() scanner := bufio.NewScanner(file) for scanner.Scan() { uri, err := url.Parse(scanner.Text()) diff --git a/docs/changelog.md b/docs/changelog.md index 29f01e95..b0b413f2 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Load the config file always ([#498](https://github.com/wabarc/wayback/pull/498)) - Signing RPM packages ([#507](https://github.com/wabarc/wayback/pull/507)) +- Fix opened file not closing ([#521](https://github.com/wabarc/wayback/pull/521)) ## [0.19.1] - 2023-03-21