summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-03-22 08:46:25 +0100
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-22 08:46:25 +0100
commit16e499159be99557dffd55a994bca3818c5d0366 (patch)
treeb845e9cfc728c858d7be40b1f7deb49fa94991ec /src
parent1fbb83707e3a43847d36896c6cbc045a91af5ecf (diff)
downloadouroboros-16e499159be99557dffd55a994bca3818c5d0366.tar.gz
ouroboros-16e499159be99557dffd55a994bca3818c5d0366.zip
irmd: Fix some missing locks
Diffstat (limited to 'src')
-rw-r--r--src/irmd/main.c3
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;
}