From bf49ccf10ad321953fa301269bf18b418ca53591 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 29 Jul 2015 09:23:14 +0200 Subject: [PATCH] Close FDs after writing --- storageLocal.go | 1 + 1 file changed, 1 insertion(+) diff --git a/storageLocal.go b/storageLocal.go index 3f67fc0..1938eed 100644 --- a/storageLocal.go +++ b/storageLocal.go @@ -42,6 +42,7 @@ func (l *LocalStorage) Write(identifier string, data io.Reader) error { if err != nil { return err } + defer f.Close() _, err = io.Copy(f, data) return err