cloud/awscloud: fix nil pointer dereference in maintenance fns

The maintenance pod is crashing when describing the images by tag, most
likely something else is failing.
This commit is contained in:
Sanne Raymaekers 2024-10-24 10:19:40 +02:00
parent 350ad58c31
commit 6ccfc7f818

View file

@ -25,7 +25,10 @@ func (a *AWS) DescribeImagesByTag(tagKey, tagValue string) ([]ec2types.Image, er
},
},
)
return imgs.Images, err
if err != nil {
return nil, err
}
return imgs.Images, nil
}
func (a *AWS) RemoveSnapshotAndDeregisterImage(image *ec2types.Image) error {