From 7278b90fe1c2e33c729951f44f027ebbb0290909 Mon Sep 17 00:00:00 2001 From: karthic rao Date: Sat, 28 May 2016 15:13:01 +0530 Subject: [PATCH] Adding defer to the lock (#1785) --- xl-v1-bucket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xl-v1-bucket.go b/xl-v1-bucket.go index db2d972de..ac88167c8 100644 --- a/xl-v1-bucket.go +++ b/xl-v1-bucket.go @@ -178,7 +178,7 @@ func (xl xlObjects) DeleteBucket(bucket string) error { } nsMutex.Lock(bucket, "") - nsMutex.Unlock(bucket, "") + defer nsMutex.Unlock(bucket, "") // Collect if all disks report volume not found. var volumeNotFoundErrCnt int