Remove closure over a range iterator.

This commit is contained in:
Josh Rickmar 2014-05-30 15:36:04 -05:00
parent df18578bc9
commit 03a45d7aa0

View file

@ -716,11 +716,11 @@ func (am *AccountManager) ChangePassphrase(old, new []byte) error {
if err := a.Wallet.Unlock(old); err != nil { if err := a.Wallet.Unlock(old); err != nil {
return err return err
} }
defer func() { defer func(a *Account) {
if err := a.Lock(); err != nil { if err := a.Lock(); err != nil {
log.Warnf("Cannot lock account: %v", err) log.Warnf("Cannot lock account: %v", err)
} }
}() }(a)
} }
// Change passphrase for each unlocked wallet. // Change passphrase for each unlocked wallet.