Skip to content

Commit

Permalink
Fix possible nil pointer dereference (#13318)
Browse files Browse the repository at this point in the history
  • Loading branch information
reugn authored Dec 2, 2021
1 parent 6f77cef commit ed0eb36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/13318.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
identity: Fix possible nil pointer dereference.
```
3 changes: 2 additions & 1 deletion vault/identity_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,9 @@ func (i *IdentityStore) Invalidate(ctx context.Context, key string) {
// storage entry is non-nil, its an indication of an update. In this
// case, entities in the updated bucket needs to be reinserted into
// MemDB.
entityIDs := make([]string, 0, len(bucket.Items))
var entityIDs []string
if bucket != nil {
entityIDs = make([]string, 0, len(bucket.Items))
for _, item := range bucket.Items {
entity, err := i.parseEntityFromBucketItem(ctx, item)
if err != nil {
Expand Down

0 comments on commit ed0eb36

Please sign in to comment.