From 0699b397934ca210b95232e9cf5f9df4c59e088f Mon Sep 17 00:00:00 2001 From: haircommander Date: Tue, 5 Jun 2018 16:07:35 -0400 Subject: Added a defer to an Unlock that immediately followed a Lock Signed-off-by: haircommander --- libpod/pod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/pod.go') 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 } -- cgit v1.2.3-54-g00ecf