diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-01-22 13:03:41 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-01-22 13:11:19 +0100 |
commit | 2deb654dc58eb2c25d15b2292366e321e475fb69 (patch) | |
tree | 058deb325511bcdbcdfdd7a988163f84a450fa73 /src | |
parent | 209a263b35acc70559233df668372b220c6fa99c (diff) | |
download | ouroboros-2deb654dc58eb2c25d15b2292366e321e475fb69.tar.gz ouroboros-2deb654dc58eb2c25d15b2292366e321e475fb69.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>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/dev.c | 2 |
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; } |