Skip to content

Commit

Permalink
Fix NPE in test/e2e/framework/providers/azure
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Jul 26, 2021
1 parent fac3dd6 commit dc9eb82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e/framework/providers/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ func newProvider() (framework.ProviderInterface, error) {
if err != nil {
framework.Logf("Couldn't open cloud provider configuration %s: %#v",
framework.TestContext.CloudConfig.ConfigFile, err)
} else {
defer config.Close()
}
defer config.Close()
azureCloud, err := azure.NewCloud(config)
return &Provider{
azureCloud: azureCloud.(*azure.Cloud),
Expand Down

0 comments on commit dc9eb82

Please sign in to comment.