Browse Source

add missed defer to unlock

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
Alexander Morozov 8 years ago
parent
commit
56175d6f97
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libnetwork/sandbox.go

+ 1 - 1
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