mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #111773 from amewayne/fix_mem_leak_in_preemption
fix a memory leakage problem when calling DryRunPreemption
This commit is contained in:
commit
7b1b801295
@ -573,6 +573,7 @@ func (ev *Evaluator) DryRunPreemption(ctx context.Context, pod *v1.Pod, potentia
|
|||||||
nonViolatingCandidates := newCandidateList(numCandidates)
|
nonViolatingCandidates := newCandidateList(numCandidates)
|
||||||
violatingCandidates := newCandidateList(numCandidates)
|
violatingCandidates := newCandidateList(numCandidates)
|
||||||
parallelCtx, cancel := context.WithCancel(ctx)
|
parallelCtx, cancel := context.WithCancel(ctx)
|
||||||
|
defer cancel()
|
||||||
nodeStatuses := make(framework.NodeToStatusMap)
|
nodeStatuses := make(framework.NodeToStatusMap)
|
||||||
var statusesLock sync.Mutex
|
var statusesLock sync.Mutex
|
||||||
var errs []error
|
var errs []error
|
||||||
|
Loading…
Reference in New Issue
Block a user