1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-17 05:48:21 +00:00

nfd-master: fix memory leak in nfd api-controller

Fixes a memory leak that happened when stopping (and then re-starting)
the nfd api controller. The stop channel was not used properly which
caused the underlying informer to keep on running.
This commit is contained in:
Markus Lehtonen 2024-03-14 15:39:10 +02:00 committed by k8s-infra-cherrypick-robot
parent 5ca55cd35a
commit 68750347f2

View file

@ -123,10 +123,7 @@ func newNfdController(config *restclient.Config, nfdApiControllerOptions nfdApiC
}
func (c *nfdController) stop() {
select {
case c.stopChan <- struct{}{}:
default:
}
close(c.stopChan)
}
func (c *nfdController) updateOneNode(typ string, obj metav1.Object) {