mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
Clone created entities that were inserted into memdb... (#16487)
* Clone created entities that were inserted into memdb to prevent possibility of data race.
This commit is contained in:
3
changelog/16487.txt
Normal file
3
changelog/16487.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
identity: Prevent possibility of data races on entity creation.
|
||||
```
|
||||
@@ -1094,7 +1094,7 @@ func (i *IdentityStore) CreateEntity(ctx context.Context) (*identity.Entity, err
|
||||
nsLabel,
|
||||
})
|
||||
|
||||
return entity, nil
|
||||
return entity.Clone()
|
||||
}
|
||||
|
||||
// CreateOrFetchEntity creates a new entity. This is used by core to
|
||||
|
||||
Reference in New Issue
Block a user