From 641c8963195100ae9c78f17ad5f1344ac8bc64b5 Mon Sep 17 00:00:00 2001 From: Kashif Khan Date: Mon, 6 May 2024 17:51:33 +0300 Subject: [PATCH] Fix nil pointer issue while creating port Signed-off-by: Kashif Khan --- pkg/cloud/services/networking/port.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cloud/services/networking/port.go b/pkg/cloud/services/networking/port.go index c822cec420..4348a0621f 100644 --- a/pkg/cloud/services/networking/port.go +++ b/pkg/cloud/services/networking/port.go @@ -192,7 +192,7 @@ func (s *Service) CreatePort(eventObject runtime.Object, portSpec *infrav1.Resol port, err := s.client.CreatePort(builder) if err != nil { - record.Warnf(eventObject, "FailedCreatePort", "Failed to create port %s: %v", port.Name, err) + record.Warnf(eventObject, "FailedCreatePort", "Failed to create port %s: %v", portSpec.Name, err) return nil, err }