summaryrefslogtreecommitdiff
path: root/libpod/pod.go
diff options
context:
space:
mode:
authorhaircommander <pehunt@redhat.com>2018-06-05 16:07:35 -0400
committerhaircommander <pehunt@redhat.com>2018-06-05 16:07:35 -0400
commit0699b397934ca210b95232e9cf5f9df4c59e088f (patch)
treec5587fe994b101f7fe181ca1e4bcc7aa9df15980 /libpod/pod.go
parent06a29f0bdeeaca1591e80aac8e08b5363fdb9977 (diff)
downloadpodman-0699b397934ca210b95232e9cf5f9df4c59e088f.tar.gz
podman-0699b397934ca210b95232e9cf5f9df4c59e088f.tar.bz2
podman-0699b397934ca210b95232e9cf5f9df4c59e088f.zip
Added a defer to an Unlock that immediately followed a Lock
Signed-off-by: haircommander <pehunt@redhat.com>
Diffstat (limited to 'libpod/pod.go')
-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
}