From ca8699e83ecaea2fea69a5d34c54f62d7263f6ea Mon Sep 17 00:00:00 2001 From: Rudi Chiarito Date: Wed, 25 May 2016 23:04:53 -0400 Subject: [PATCH] Fix long-standing bug in aws.stringSetToPointers Instead of N pointers, we were returning N null pointers, followed by the real thing. It's not clear why we didn't trip on this until now, maybe there is a new server-side check for empty subnetID strings. --- pkg/cloudprovider/providers/aws/aws_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cloudprovider/providers/aws/aws_utils.go b/pkg/cloudprovider/providers/aws/aws_utils.go index 310b4898eca91..0067ded7f08b8 100644 --- a/pkg/cloudprovider/providers/aws/aws_utils.go +++ b/pkg/cloudprovider/providers/aws/aws_utils.go @@ -25,7 +25,7 @@ func stringSetToPointers(in sets.String) []*string { if in == nil { return nil } - out := make([]*string, len(in)) + out := make([]*string, 0, len(in)) for k := range in { out = append(out, aws.String(k)) }