Skip to content

Commit 744ea3a

Browse files
committed
[staging/azure] azure_utils: fix range iterator issue in convertMaptoMapPointer
Signed-off-by: Gaurav Singh <[email protected]> Use local variable for the copy of iterator variable
1 parent 8c30056 commit 744ea3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ func ConvertTagsToMap(tags string) (map[string]string, error) {
110110
func convertMaptoMapPointer(origin map[string]string) map[string]*string {
111111
newly := make(map[string]*string)
112112
for k, v := range origin {
113-
newly[k] = &v
113+
value := v
114+
newly[k] = &value
114115
}
115116
return newly
116117
}

0 commit comments

Comments
 (0)