Browse Source

fix nil pointer dereference in azure discovery (#5587)

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
pull/5584/head
Dmitry Shmulevich 6 years ago committed by Brian Brazil
parent
commit
d81df5609d
  1. 2
      discovery/azure/azure.go

2
discovery/azure/azure.go

@ -335,7 +335,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
if *networkInterface.Primary {
for _, ip := range *networkInterface.IPConfigurations {
if ip.PublicIPAddress != nil {
if ip.PublicIPAddress != nil && ip.PublicIPAddress.PublicIPAddressPropertiesFormat != nil {
labels[azureLabelMachinePublicIP] = model.LabelValue(*ip.PublicIPAddress.IPAddress)
}
if ip.PrivateIPAddress != nil {

Loading…
Cancel
Save