diff --git a/builtin/logical/transit/path_rotate.go b/builtin/logical/transit/path_rotate.go index c024aede4b..1d7efea56d 100644 --- a/builtin/logical/transit/path_rotate.go +++ b/builtin/logical/transit/path_rotate.go @@ -70,7 +70,6 @@ func (b *backend) pathRotateWrite(ctx context.Context, req *logical.Request, d * var keyId string keyId, err = GetManagedKeyUUID(ctx, b, managedKeyName, managedKeyId) if err != nil { - p.Unlock() return nil, err } err = p.RotateManagedKey(ctx, req.Storage, keyId) diff --git a/changelog/30214.txt b/changelog/30214.txt new file mode 100644 index 0000000000..733bd861dc --- /dev/null +++ b/changelog/30214.txt @@ -0,0 +1,3 @@ +```release-note:bug +secrets/transit: fix a panic when rotating on a managed key returns an error +``` \ No newline at end of file