mirror of
https://github.com/golang/go
synced 2024-11-14 13:20:30 -07:00
internal/syscall/windows: fix handle leak in Mkdirat
Mkdirat does not close the handle returned by CreateFile, but it should. Mkdirat has been introduced in this developer cycle, so it is not necessary to backport this fix to any release branch. Change-Id: Icddac5ccdc6a142a5be5392a39aba2ae7cc9c69a Reviewed-on: https://go-review.googlesource.com/c/go/+/620195 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
This commit is contained in:
parent
89f29a772a
commit
5c1a68aedd
@ -164,5 +164,6 @@ func Mkdirat(dirfd syscall.Handle, name string, mode uint32) error {
|
||||
if err != nil {
|
||||
return ntCreateFileError(err, 0)
|
||||
}
|
||||
syscall.CloseHandle(h)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user