github-vet / github-vet/rangeloop-pointer-findings
aws/aws-app-mesh-controller-for-k8s: pkg/gatewayroute/enqueue_requests_for_virtualgateway_events.go; 6 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [aws/aws-app-mesh-controller-for-k8s](https://www.github.com/aws/aws-app-mesh-controller-for-k8s) at [pkg/gatewayroute/enqueue_requests_for_virtualgateway_events.go](https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/de7c8572e0239a0ec156786d27031304de550c39/pkg/gatewayroute/enqueue_requests_for_virtualgateway_events.go#L65-L70)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first
issue it finds, so please do not limit your consideration to the contents of the below message.
> function call at line 69 may store a reference to gr
[Click here to see the code in its original context.](https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/de7c8572e0239a0ec156786d27031304de550c39/pkg/gatewayroute/enqueue_requests_for_virtualgateway_events.go#L65-L70)
Click here to show the 6 line(s) of Go which triggered the analyzer.
```go
for _, gr := range grList.Items {
if gr.Spec.VirtualGatewayRef == nil || !virtualgateway.IsVirtualGatewayReferenced(vg, *gr.Spec.VirtualGatewayRef) {
continue
}
queue.Add(ctrl.Request{NamespacedName: k8s.NamespacedName(&gr)})
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: de7c8572e0239a0ec156786d27031304de550c39
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.