]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/vcweb: close the .access file
authorIan Lance Taylor <iant@golang.org>
Fri, 3 Jan 2025 21:49:20 +0000 (13:49 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 3 Jan 2025 22:12:15 +0000 (14:12 -0800)
For #71112

Change-Id: Ifda4fc8de148c42a2154da54b53d7215b9a6faa0
Reviewed-on: https://go-review.googlesource.com/c/go/+/640175
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/cmd/go/internal/vcweb/auth.go

index 383bf759ffcdc1ad44d22b15d695bdff519916d0..e7c7c6ca265758294ab27731b6d44a6a6e5f40b9 100644 (file)
@@ -63,6 +63,7 @@ func (h *authHandler) Handler(dir string, env []string, logger *log.Logger) (htt
                        var err error
                        accessFile, err = fs.Open(path.Join(accessDir, ".access"))
                        if err == nil {
+                               defer accessFile.Close()
                                break
                        }