Переглянути джерело

add missed defer to unlock

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
Alexander Morozov 8 роки тому
батько
коміт
56175d6f97
1 змінених файлів з 1 додано та 1 видалено
  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{} {
 func (sb *sandbox) Labels() map[string]interface{} {
 	sb.Lock()
 	sb.Lock()
-	sb.Unlock()
+	defer sb.Unlock()
 	opts := make(map[string]interface{}, len(sb.config.generic))
 	opts := make(map[string]interface{}, len(sb.config.generic))
 	for k, v := range sb.config.generic {
 	for k, v := range sb.config.generic {
 		opts[k] = v
 		opts[k] = v