1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 02:37:11 +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
parent 1ff7a9457b
commit 70fd3757c4

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) {