From 7a256adbafed8599d7c355422f50d4b95b60bf46 Mon Sep 17 00:00:00 2001 From: changwang ma Date: Fri, 25 Oct 2024 23:41:42 +0800 Subject: [PATCH] os: add File.Close for TestFileStatNUL Change-Id: I9f8b0beed16f38d71055cdc7606306d93fb535c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/622655 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- src/os/os_windows_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os/os_windows_test.go b/src/os/os_windows_test.go index fb95499c17..d9c8fe3db9 100644 --- a/src/os/os_windows_test.go +++ b/src/os/os_windows_test.go @@ -990,6 +990,8 @@ func TestFileStatNUL(t *testing.T) { if err != nil { t.Fatal(err) } + defer f.Close() + fi, err := f.Stat() if err != nil { t.Fatal(err) -- 2.48.1