summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorUrvashi Mohnani <umohnani@redhat.com>2018-06-05 17:15:19 -0400
committerGitHub <noreply@github.com>2018-06-05 17:15:19 -0400
commit3901ecc7b6b08b7555ccf0e8a05b278b05a9629c (patch)
treec5587fe994b101f7fe181ca1e4bcc7aa9df15980 /libpod
parent06a29f0bdeeaca1591e80aac8e08b5363fdb9977 (diff)
parent0699b397934ca210b95232e9cf5f9df4c59e088f (diff)
downloadpodman-3901ecc7b6b08b7555ccf0e8a05b278b05a9629c.tar.gz
podman-3901ecc7b6b08b7555ccf0e8a05b278b05a9629c.tar.bz2
podman-3901ecc7b6b08b7555ccf0e8a05b278b05a9629c.zip
Merge pull request #909 from haircommander/dev/haircommander/bug/907
Added a defer to an Unlock that immediately followed a Lock
Diffstat (limited to 'libpod')
-rw-r--r--libpod/pod.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/pod.go b/libpod/pod.go
index 19347dde7..1fde4285d 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -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
}