From 242df4f4d7c46e85fc793870fe32265d735670f9 Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Thu, 18 Oct 2018 07:53:12 -0700 Subject: [PATCH] Remove lookup check during alias removal (#5524) * Possible fix for 5348 * Fix compilation --- vault/identity_store_util.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/vault/identity_store_util.go b/vault/identity_store_util.go index 2df22e9ea51a..6fe3d0daa057 100644 --- a/vault/identity_store_util.go +++ b/vault/identity_store_util.go @@ -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 }