From 56175d6f97e06202d17f1809e2c5a3ab16f33a0f Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Thu, 8 Sep 2016 12:22:20 -0700 Subject: [PATCH] add missed defer to unlock Signed-off-by: Alexander Morozov --- libnetwork/sandbox.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnetwork/sandbox.go b/libnetwork/sandbox.go index 775b92ab31..4367518d70 100644 --- a/libnetwork/sandbox.go +++ b/libnetwork/sandbox.go @@ -147,7 +147,7 @@ func (sb *sandbox) Key() string { func (sb *sandbox) Labels() map[string]interface{} { sb.Lock() - sb.Unlock() + defer sb.Unlock() opts := make(map[string]interface{}, len(sb.config.generic)) for k, v := range sb.config.generic { opts[k] = v