浏览代码

plugin: fix a double RLock bug

Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
(cherry picked from commit 34837febc42859f7e8804a3417db133c963e38b3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Ziheng Liu 5 年之前
父节点
当前提交
32366de5f9
共有 1 个文件被更改,包括 0 次插入2 次删除
  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.
 	 * bypassing the daemon. For such tests, this check is necessary.
 	 */
 	 */
 	if ps != nil {
 	if ps != nil {
-		ps.RLock()
 		result = ps.getAllByCap(capability)
 		result = ps.getAllByCap(capability)
-		ps.RUnlock()
 	}
 	}
 
 
 	// Lookup with legacy model
 	// Lookup with legacy model