diff --git a/zk/utils/utils.go b/zk/utils/utils.go index 5d4038337f4..3376b863c61 100644 --- a/zk/utils/utils.go +++ b/zk/utils/utils.go @@ -153,6 +153,7 @@ func GetBatchLocalExitRootFromSCStorage(batchNo uint64, db DbReader, tx kv.Tx) ( } stateReader := state.NewPlainState(tx, blockNo+1, systemcontracts.SystemContractCodeLookup["hermez"]) + defer stateReader.Close() rawLer, err := stateReader.ReadAccountStorage(state.GER_MANAGER_ADDRESS, 1, &state.GLOBAL_EXIT_ROOT_POS_1) if err != nil { return libcommon.Hash{}, err