diff --git a/context.go b/context.go index d1a82c21..4939236f 100644 --- a/context.go +++ b/context.go @@ -427,6 +427,7 @@ func (c *context) File(file string) error { if err != nil { return ErrNotFound } + defer f.Close() if fi, err = f.Stat(); err != nil { return err }