Browse code

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 authored on 2020/02/26 03:51:13
Showing 1 changed files
... ...
@@ -188,9 +188,7 @@ func (ps *Store) GetAllByCap(capability string) ([]plugingetter.CompatPlugin, er
188 188
 	 * bypassing the daemon. For such tests, this check is necessary.
189 189
 	 */
190 190
 	if ps != nil {
191
-		ps.RLock()
192 191
 		result = ps.getAllByCap(capability)
193
-		ps.RUnlock()
194 192
 	}
195 193
 
196 194
 	// Lookup with legacy model