From 4afcd8c3fdf77658dfa75ef450d1cdc71beb687c Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Fri, 25 Oct 2024 16:10:04 +0200 Subject: [PATCH] cloud/awscloud: fix another nilpointer in maintenance functions --- internal/cloud/awscloud/maintenance.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/cloud/awscloud/maintenance.go b/internal/cloud/awscloud/maintenance.go index 2a8c69de91..e071731aea 100644 --- a/internal/cloud/awscloud/maintenance.go +++ b/internal/cloud/awscloud/maintenance.go @@ -78,7 +78,10 @@ func (a *AWS) DescribeInstancesByTag(tagKey, tagValue string) ([]ec2types.Reserv }, }, ) - return res.Reservations, err + if err != nil { + return nil, err + } + return res.Reservations, nil } func (a *AWS) TerminateInstances(instanceIDs []string) error {