1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-09 14:40:05 +00:00

Close FDs after writing

This commit is contained in:
Knut Ahlers 2015-07-29 09:23:14 +02:00
parent 9e7a92abe7
commit bf49ccf10a

View file

@ -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