From 03a45d7aa0b2ae631242d87b20dbf9f70f9fc7e3 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Fri, 30 May 2014 15:36:04 -0500 Subject: [PATCH] Remove closure over a range iterator. --- acctmgr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acctmgr.go b/acctmgr.go index 31914c7..f00e2c1 100644 --- a/acctmgr.go +++ b/acctmgr.go @@ -716,11 +716,11 @@ func (am *AccountManager) ChangePassphrase(old, new []byte) error { if err := a.Wallet.Unlock(old); err != nil { return err } - defer func() { + defer func(a *Account) { if err := a.Lock(); err != nil { log.Warnf("Cannot lock account: %v", err) } - }() + }(a) } // Change passphrase for each unlocked wallet.