mirror of
https://github.com/minio/minio
synced 2024-10-14 11:52:56 +00:00
fix: close sessionPolicyFile in the sts-assume-role example (#19428)
This commit is contained in:
parent
d3a07c29ba
commit
87299eba10
|
@ -85,6 +85,7 @@ func main() {
|
|||
if f, err := os.Open(sessionPolicyFile); err != nil {
|
||||
log.Fatalf("Unable to open session policy file: %v", err)
|
||||
} else {
|
||||
defer f.Close()
|
||||
bs, err := io.ReadAll(f)
|
||||
if err != nil {
|
||||
log.Fatalf("Error reading session policy file: %v", err)
|
||||
|
|
Loading…
Reference in a new issue