libnetwork
libnetwork copied to clipboard
[Bug]:A potential goleak
blocking position:
https://github.com/moby/libnetwork/blob/3797618f9a38372e8107d8c06f6ae199e1133ae8/networkdb/cluster.go#L257
The nDB.cancelCtx() is in the func clusterLeave(), when return err ,the cancelFunc can't get executed and the goroutine leak.
https://github.com/moby/libnetwork/blob/3797618f9a38372e8107d8c06f6ae199e1133ae8/networkdb/cluster.go#L224-L243
You can reproduce the bug by making program execute the path and test it by goleak