diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-09 23:29:38 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-09 23:29:38 +0200 |
commit | 27c99995c8059eb897b704d84596ca0abca6db9b (patch) | |
tree | b560f3f097363e95f03acff11ed5d1c151aeb891 /src/irmd | |
parent | 1c67b4cd199f9efed96468a2a2ee69fd755bcf7c (diff) | |
download | ouroboros-27c99995c8059eb897b704d84596ca0abca6db9b.tar.gz ouroboros-27c99995c8059eb897b704d84596ca0abca6db9b.zip |
irmd: Fix locking
registry_sanitize_apis should be called under write locked reg_lock.
Diffstat (limited to 'src/irmd')
-rw-r--r-- | src/irmd/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |