Skip to content

Commit

Permalink
Adds missing unlock of RWMutex in OIDC delete key (hashicorp#12916)
Browse files Browse the repository at this point in the history
  • Loading branch information
austingebauer authored and Artem Alexandrov committed Feb 4, 2022
1 parent 98236e9 commit 9611adf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/12916.txt
@@ -0,0 +1,3 @@
```release-note:bug
identity/token: Adds missing call to unlock mutex in key deletion error handling
```
2 changes: 2 additions & 0 deletions vault/identity_store_oidc.go
Expand Up @@ -703,6 +703,7 @@ func (i *IdentityStore) pathOIDCDeleteKey(ctx context.Context, req *logical.Requ

roleNames, err := i.roleNamesReferencingTargetKeyName(ctx, req, targetKeyName)
if err != nil {
i.oidcLock.Unlock()
return nil, err
}

Expand All @@ -715,6 +716,7 @@ func (i *IdentityStore) pathOIDCDeleteKey(ctx context.Context, req *logical.Requ

clientNames, err := i.clientNamesReferencingTargetKeyName(ctx, req, targetKeyName)
if err != nil {
i.oidcLock.Unlock()
return nil, err
}

Expand Down

0 comments on commit 9611adf

Please sign in to comment.