Skip to content

Commit

Permalink
Remove lookup check during alias removal (#5524)
Browse files Browse the repository at this point in the history
* Possible fix for 5348

* Fix compilation
  • Loading branch information
vishalnayak authored Oct 18, 2018
1 parent 18deb2d commit 242df4f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions vault/identity_store_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -1072,14 +1072,7 @@ func (i *IdentityStore) deleteAliasesInEntityInTxn(txn *memdb.Txn, entity *ident
// Remove identity indices from aliases table for those that needs to
// be removed
for _, alias := range removeList {
aliasToBeRemoved, err := i.MemDBAliasByIDInTxn(txn, alias.ID, false, false)
if err != nil {
return err
}
if aliasToBeRemoved == nil {
return fmt.Errorf("alias was not indexed")
}
err = i.MemDBDeleteAliasByIDInTxn(txn, aliasToBeRemoved.ID, false)
err := i.MemDBDeleteAliasByIDInTxn(txn, alias.ID, false)
if err != nil {
return err
}
Expand Down

0 comments on commit 242df4f

Please sign in to comment.