Merge pull request #909 from haircommander/dev/haircommander/bug/907

Added a defer to an Unlock that immediately followed a Lock
This commit is contained in:
Urvashi Mohnani 2018-06-05 17:15:19 -04:00 committed by GitHub
commit 3901ecc7b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ func (p *Pod) UsePodCgroup() bool {
// CgroupPath returns the path to the pod's CGroup
func (p *Pod) CgroupPath() (string, error) {
p.lock.Lock()
p.lock.Unlock()
defer p.lock.Unlock()
if err := p.updatePod(); err != nil {
return "", err
}