summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-01-22 13:03:41 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-01-22 13:11:19 +0100
commit2deb654dc58eb2c25d15b2292366e321e475fb69 (patch)
tree058deb325511bcdbcdfdd7a988163f84a450fa73
parent209a263b35acc70559233df668372b220c6fa99c (diff)
downloadouroboros-0.9.2.tar.gz
ouroboros-0.9.2.zip
lib: Fix bad lock in dev.c0.9.2
There was a rdlock() instead of an unlock(). This fixes #3. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
-rw-r--r--src/lib/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 4df88b9b..99ab4359 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -1415,7 +1415,7 @@ int local_flow_write(int fd,
pthread_rwlock_rdlock(&ai.lock);
if (ai.flows[fd].port_id < 0) {
- pthread_rwlock_rdlock(&ai.lock);
+ pthread_rwlock_unlock(&ai.lock);
return -ENOTALLOC;
}