Skip to content

Commit

Permalink
fix: explicit fd close fix (#5129)
Browse files Browse the repository at this point in the history
  • Loading branch information
wooffie authored Feb 13, 2025
1 parent 147e8f5 commit 42b78de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/admin-cluster-bucket-import.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func mainClusterBucketImport(ctx *cli.Context) error {

f, e = os.Open(args.Get(1))
fatalIf(probe.NewError(e).Trace(args...), "Unable to get bucket metadata")
defer f.Close()

// Create a new MinIO Admin Client
client, err := newAdminClient(aliasedURL)
Expand Down
1 change: 1 addition & 0 deletions cmd/admin-cluster-iam-import.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ func mainClusterIAMImport(ctx *cli.Context) error {

f, e = os.Open(args.Get(1))
fatalIf(probe.NewError(e).Trace(args...), "Unable to get IAM info")
defer f.Close()

// Create a new MinIO Admin Client
client, err := newAdminClient(aliasedURL)
Expand Down

0 comments on commit 42b78de

Please sign in to comment.