fix incorrect deferred vm release

This commit is contained in:
vyzo 2023-03-23 19:51:23 +02:00
parent 317a87d669
commit f11a7f8940
2 changed files with 2 additions and 2 deletions

View File

@ -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")

View File

@ -159,7 +159,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)