diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-03-22 09:40:14 +0000 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-03-22 09:40:14 +0000 |
commit | d9b113acbecb3f78e3ace561365a5f0add949787 (patch) | |
tree | aca9b90d813a46820acfa50287c07c4e265a65e6 /src | |
parent | 9507a37066a45be1db6a7755edadc28d43ac5c79 (diff) | |
parent | 16e499159be99557dffd55a994bca3818c5d0366 (diff) | |
download | ouroboros-d9b113acbecb3f78e3ace561365a5f0add949787.tar.gz ouroboros-d9b113acbecb3f78e3ace561365a5f0add949787.zip |
Merged in dstaesse/ouroboros/be-irmd (pull request #410)
irmd: Fix some missing locks
Diffstat (limited to 'src')
-rw-r--r-- | src/irmd/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 9eb34f38..9a062cf3 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -587,6 +587,7 @@ static int bind_ap(char * ap, name_dup = strdup(name); if (name_dup == NULL) { + pthread_rwlock_unlock(&irmd->reg_lock); pthread_rwlock_unlock(&irmd->state_lock); return -ENOMEM; } @@ -995,6 +996,8 @@ static struct irm_flow * flow_accept(pid_t api, e = api_table_get(&irmd->api_table, api); if (e == NULL) { /* Can only happen if server called ap_init(NULL); */ + pthread_rwlock_unlock(&irmd->reg_lock); + pthread_rwlock_unlock(&irmd->state_lock); log_err("Unknown instance %d calling accept.", api); return NULL; } |