fix: x/group/internal/orm: return iterator close errors (#13714)
Instead of nakedly always returning nil, instead return the actual close errors. Fixes https://github.com/cosmos/cosmos-sdk/security/code-scanning/6295 Fixes https://github.com/cosmos/cosmos-sdk/security/code-scanning/6296
This commit is contained in:
parent
0d8787c3bd
commit
cafa6b5125
@ -256,8 +256,7 @@ func (i indexIterator) LoadNext(dest codec.ProtoMarshaler) (RowID, error) {
|
||||
|
||||
// Close releases the iterator and should be called at the end of iteration
|
||||
func (i indexIterator) Close() error {
|
||||
i.it.Close()
|
||||
return nil
|
||||
return i.it.Close()
|
||||
}
|
||||
|
||||
// PrefixRange turns a prefix into a (start, end) range. The start is the given prefix value and
|
||||
|
||||
@ -308,6 +308,5 @@ func (i typeSafeIterator) LoadNext(dest codec.ProtoMarshaler) (RowID, error) {
|
||||
}
|
||||
|
||||
func (i typeSafeIterator) Close() error {
|
||||
i.it.Close()
|
||||
return nil
|
||||
return i.it.Close()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user