Skip to content

Commit

Permalink
fix(qrm): fix network plugin possible memory leak (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
csfldf authored Aug 8, 2023
1 parent 2f6c4fb commit 3229ded
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/agent/qrm-plugins/network/staticpolicy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,12 @@ func (p *StaticPolicy) Start() (err error) {

p.Lock()
defer func() {
if err == nil {
p.started = true
if !p.started {
if err == nil {
p.started = true
} else {
close(p.stopCh)
}
}
p.Unlock()
}()
Expand Down

0 comments on commit 3229ded

Please sign in to comment.