From 629a4f79cd4865ddbae6b226bf5ecb46e8cf9a33 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 5 Apr 2022 15:06:14 +0300 Subject: [PATCH] [#1293] metabase: Fix out-of-range panic in `freePotentialLocks` Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/metabase/lock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/local_object_storage/metabase/lock.go b/pkg/local_object_storage/metabase/lock.go index e1ba45706a..cb055439c6 100644 --- a/pkg/local_object_storage/metabase/lock.go +++ b/pkg/local_object_storage/metabase/lock.go @@ -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) }