-
Notifications
You must be signed in to change notification settings - Fork 602
Closed
Description
What I see:
We open new file descriptor here:
mc/cmd/admin-cluster-iam-import.go
Line 195 in 10c5036
f, e := os.Open(args.Get(1)) |
It will be closed by defer:
mc/cmd/admin-cluster-iam-import.go
Line 202 in 10c5036
defer f.Close() |
After we open one more descriptor:
mc/cmd/admin-cluster-iam-import.go
Line 208 in 10c5036
f, e = os.Open(args.Get(1)) |
We put him in functions ImportIAMV2(ctx context.Context, contentReader io.ReadCloser)
or ImportIAM(ctx context.Context, contentReader io.ReadCloser)
Its takes ReadCloser
, but not use Close()
.
In result second file descriptor is not closed. We can add one more defer f.Close()
to handle this case
P.S. or it is closed by another code and I didn't found this =0