diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-10-26 16:59:36 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-10-26 16:59:36 +0200 |
commit | aa11e240def809e92d42dcfd0ac934606967583b (patch) | |
tree | 5f77626c3ad3b411c1741050f8b24ae498c7de93 /src | |
parent | 00f0606c3b4e74e768ab250bf04572afe178b4f6 (diff) | |
download | ouroboros-aa11e240def809e92d42dcfd0ac934606967583b.tar.gz ouroboros-aa11e240def809e92d42dcfd0ac934606967583b.zip |
irmd: Fix wrong unlocks
This fixes 2 wrong unlocks in the bind API method.
Diffstat (limited to 'src')
-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 740472b9..1ac989de 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -590,14 +590,14 @@ static int bind_api(pid_t api, e = api_table_get(&irmd->api_table, api); if (e == NULL) { LOG_ERR("AP-I %d does not exist.", api); - pthread_rwlock_wrlock(&irmd->reg_lock); + pthread_rwlock_unlock(&irmd->reg_lock); pthread_rwlock_unlock(&irmd->state_lock); return -1; } name_dup = strdup(name); if (name_dup == NULL) { - pthread_rwlock_wrlock(&irmd->reg_lock); + pthread_rwlock_unlock(&irmd->reg_lock); pthread_rwlock_unlock(&irmd->state_lock); return -ENOMEM; } |