add missed defer to unlock

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexander Morozov 2016-09-08 12:22:20 -07:00
parent 71b8749971
commit 56175d6f97

View file

@ -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