From 2deb654dc58eb2c25d15b2292366e321e475fb69 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 22 Jan 2018 13:03:41 +0100 Subject: lib: Fix bad lock in dev.c There was a rdlock() instead of an unlock(). This fixes #3. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3