Commit 715b5a6
authored
fix(auth): Fix Tenant iterator to return the correct sequence of pointers (#323)
Previously, tenant_mgt.go would copy the tenant from the network
response, and return a pointer to it. Then it would re-use the same
memory for the next tenant, resulting in a list of pointers that all
pointed to the last tenant.
This change returns pointers to the network response instead (and as a
bonus, avoids the copy entirely).1 parent 04ebfd5 commit 715b5a6
2 files changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
348 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1086 | 1086 | | |
1087 | 1087 | | |
1088 | 1088 | | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1089 | 1096 | | |
1090 | 1097 | | |
1091 | 1098 | | |
| |||
1099 | 1106 | | |
1100 | 1107 | | |
1101 | 1108 | | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
1102 | 1116 | | |
1103 | 1117 | | |
1104 | 1118 | | |
| |||
1423 | 1437 | | |
1424 | 1438 | | |
1425 | 1439 | | |
1426 | | - | |
| 1440 | + | |
1427 | 1441 | | |
1428 | 1442 | | |
1429 | 1443 | | |
1430 | 1444 | | |
1431 | 1445 | | |
1432 | | - | |
| 1446 | + | |
1433 | 1447 | | |
1434 | 1448 | | |
1435 | 1449 | | |
| |||
0 commit comments