From c6bf5b85fb4bf5e19f73043e6867073f32eea2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Fri, 17 Jul 2015 23:25:55 -0700 Subject: [PATCH] Properly close files after downloading them --- cmd/fdroidcl/update.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/fdroidcl/update.go b/cmd/fdroidcl/update.go index dc5b322..d046079 100644 --- a/cmd/fdroidcl/update.go +++ b/cmd/fdroidcl/update.go @@ -75,6 +75,7 @@ func downloadEtag(url, path string, sum []byte) error { if err != nil { return err } + defer f.Close() if sum == nil { _, err := io.Copy(f, resp.Body) if err != nil {