mirror of
https://github.com/minio/minio.git
synced 2025-01-27 14:43:18 -05: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 {
|
if f, err := os.Open(sessionPolicyFile); err != nil {
|
||||||
log.Fatalf("Unable to open session policy file: %v", err)
|
log.Fatalf("Unable to open session policy file: %v", err)
|
||||||
} else {
|
} else {
|
||||||
|
defer f.Close()
|
||||||
bs, err := io.ReadAll(f)
|
bs, err := io.ReadAll(f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Error reading session policy file: %v", err)
|
log.Fatalf("Error reading session policy file: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user