[#1293] metabase: Fix out-of-range panic in freePotentialLocks

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-04-05 15:06:14 +03:00 committed by Alex Vanin
parent e62e02815b
commit 629a4f79cd

View file

@ -150,7 +150,7 @@ func freePotentialLocks(tx *bbolt.Tx, idCnr cid.ID, locker oid.ID) error {
// exclude locker
keyLockers = append(keyLockers[:i], keyLockers[i+1:]...)
v, err = encodeList(append(keyLockers[:i], keyLockers[i+1:]...))
v, err = encodeList(keyLockers)
if err != nil {
return fmt.Errorf("encode updated list of lockers: %w", err)
}