mirror of
https://github.com/containers/podman.git
synced 2025-06-22 09:58:10 +08:00
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:
@ -78,7 +78,7 @@ func (p *Pod) UsePodCgroup() bool {
|
|||||||
// CgroupPath returns the path to the pod's CGroup
|
// CgroupPath returns the path to the pod's CGroup
|
||||||
func (p *Pod) CgroupPath() (string, error) {
|
func (p *Pod) CgroupPath() (string, error) {
|
||||||
p.lock.Lock()
|
p.lock.Lock()
|
||||||
p.lock.Unlock()
|
defer p.lock.Unlock()
|
||||||
if err := p.updatePod(); err != nil {
|
if err := p.updatePod(); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user