Skip to content

Commit

Permalink
fix possible nullptr-deref (#883)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBurger authored Jun 10, 2024
1 parent 6604a6b commit 6def976
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/infrastructure/infraflow/infra_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ func (ia *InfrastructureAdapter) virtualNetworkConfig() VirtualNetworkConfig {
if cidr := ia.config.Networks.VNet.CIDR; cidr != nil {
// copy string
vnc.CIDR = to.Ptr(*cidr)
} else {
vnc.CIDR = to.Ptr(*ia.config.Networks.Workers)
} else if cidr = ia.config.Networks.Workers; cidr != nil {
vnc.CIDR = to.Ptr(*cidr)
}

return vnc
Expand Down

0 comments on commit 6def976

Please sign in to comment.