Browse Source

plugin: fix a double RLock bug

Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
Ziheng Liu 5 years ago
parent
commit
34837febc4
1 changed files with 0 additions and 2 deletions
  1. 0 2
      plugin/store.go

+ 0 - 2
plugin/store.go

@@ -188,9 +188,7 @@ func (ps *Store) GetAllByCap(capability string) ([]plugingetter.CompatPlugin, er
 	 * bypassing the daemon. For such tests, this check is necessary.
 	 */
 	if ps != nil {
-		ps.RLock()
 		result = ps.getAllByCap(capability)
-		ps.RUnlock()
 	}
 
 	// Lookup with legacy model