fix(778): remove extra mutex lock when resolving bug prefix

Steve Moyer created

Change summary

cache/repo_cache_bug.go | 4 ----
1 file changed, 4 deletions(-)

Detailed changes

cache/repo_cache_bug.go 🔗

@@ -499,14 +499,10 @@ func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title strin
 
 // RemoveBug removes a bug from the cache and repo given a bug id prefix
 func (c *RepoCache) RemoveBug(prefix string) error {
-	c.muBug.RLock()
-
 	b, err := c.ResolveBugPrefix(prefix)
 	if err != nil {
-		c.muBug.RUnlock()
 		return err
 	}
-	c.muBug.RUnlock()
 
 	c.muBug.Lock()
 	err = bug.RemoveBug(c.repo, b.Id())