aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Johnson <[email protected]>2025-11-25 21:28:03 -0500
committerSamuel Johnson <[email protected]>2025-11-25 21:28:03 -0500
commita51218dc8c5270d6675c3a69ab828483c8d45369 (patch)
treed4434cbabb5d0782674bd4a48357194709634539
parent2c8a11be8f3305652f54ff6dd58ec51275658c54 (diff)
Close root
-rw-r--r--cmd/web/handlers/fs.go1
1 files changed, 1 insertions, 0 deletions
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 {