diff --git a/echo.go b/echo.go index b7c71736..021a225f 100644 --- a/echo.go +++ b/echo.go @@ -394,6 +394,7 @@ func serveFile(dir, file string, c *Context) error { if err != nil { return NewHTTPError(http.StatusNotFound) } + defer f.Close() fi, _ := f.Stat() if fi.IsDir() {