Skip to content

Commit 6f61072

Browse files
authored
Merge pull request kubernetes#85975 from ldx/azure-fix-nilptr
Fix nil pointer dereference in the azure provider
2 parents 40320be + 3fa070a commit 6f61072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_standard.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ func (as *availabilitySet) GetZoneByNodeName(name string) (cloudprovider.Zone, e
481481
failureDomain = as.makeZone(to.String(vm.Location), zoneID)
482482
} else {
483483
// Availability zone is not used for the node, falling back to fault domain.
484-
failureDomain = strconv.Itoa(int(*vm.VirtualMachineProperties.InstanceView.PlatformFaultDomain))
484+
failureDomain = strconv.Itoa(int(to.Int32(vm.VirtualMachineProperties.InstanceView.PlatformFaultDomain)))
485485
}
486486

487487
zone := cloudprovider.Zone{

0 commit comments

Comments
 (0)