From a51218dc8c5270d6675c3a69ab828483c8d45369 Mon Sep 17 00:00:00 2001 From: Samuel Johnson Date: Tue, 25 Nov 2025 21:28:03 -0500 Subject: Close root --- cmd/web/handlers/fs.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/web/handlers/fs.go') diff --git a/cmd/web/handlers/fs.go b/cmd/web/handlers/fs.go index 8a10409..629a7e1 100644 --- a/cmd/web/handlers/fs.go +++ b/cmd/web/handlers/fs.go @@ -40,6 +40,7 @@ func (ctx *fsContext) get(w http.ResponseWriter, r *http.Request) { http.Error(w, "Internal Server Error", 500) return } + defer root.Close() file, err := root.ReadFile(name) if err != nil { -- cgit v1.2.3