diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index 6e5be0b0a..900389f56 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -108,7 +108,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal if err != nil { return cid.Undef, fmt.Errorf("creating vm: %w", err) } - defer genesisVm.Done() + defer func() { genesisVm.Done() }() if len(miners) == 0 { return cid.Undef, xerrors.New("no genesis miners") diff --git a/chain/stmgr/call.go b/chain/stmgr/call.go index e94d9bccb..575875014 100644 --- a/chain/stmgr/call.go +++ b/chain/stmgr/call.go @@ -169,7 +169,7 @@ func (sm *StateManager) callInternal(ctx context.Context, msg *types.Message, pr if err != nil { return nil, xerrors.Errorf("failed to set up vm: %w", err) } - defer vmi.Done() + defer func() { vmi.Done() }() for i, m := range priorMsgs { _, err = vmi.ApplyMessage(ctx, m)