From 27c99995c8059eb897b704d84596ca0abca6db9b Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Tue, 9 Aug 2016 23:29:38 +0200 Subject: irmd: Fix locking registry_sanitize_apis should be called under write locked reg_lock. --- src/irmd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/irmd') diff --git a/src/irmd/main.c b/src/irmd/main.c index 8503fcfa..f9f34416 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1402,10 +1402,10 @@ void * irm_flow_cleaner() pthread_rwlock_unlock(&irmd->flows_lock); - registry_sanitize_apis(&irmd->registry); - pthread_rwlock_wrlock(&irmd->reg_lock); + registry_sanitize_apis(&irmd->registry); + list_for_each_safe(pos, n, &irmd->spawned_apis) { struct spawned_api * api = list_entry(pos, struct spawned_api, next); -- cgit v1.2.3