From b3d8f02395c0880bf8df8fee02e95b20b4c3c822 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Mon, 21 Oct 2013 10:32:03 -0400 Subject: [PATCH] Move defered Unlock() before a possible function return. --- cmdmgr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdmgr.go b/cmdmgr.go index e0671db..6c5df44 100644 --- a/cmdmgr.go +++ b/cmdmgr.go @@ -752,13 +752,13 @@ func CreateEncryptedWallet(reply chan []byte, msg *btcjson.Message) { // Does this wallet already exist? wallets.Lock() + defer wallets.Unlock() if w := wallets.m[wname]; w != nil { e := WalletInvalidAccountName e.Message = "Wallet already exists." ReplyError(reply, msg.Id, &e) return } - defer wallets.Unlock() var net btcwire.BitcoinNet if cfg.MainNet {