From 7c20585b55660fa4cee68ab1bd4b7de2b1f5be53 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Fri, 25 Aug 2017 09:36:47 +0200 Subject: lib: Fix bad locking in frcti_read A read lock was taken when a write lock was needed. --- src/lib/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/dev.c b/src/lib/dev.c index 8009a186..1310afd8 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -375,7 +375,7 @@ static ssize_t frcti_read(int fd) clock_gettime(CLOCK_REALTIME_COARSE, &now); - pthread_rwlock_rdlock(&ai.lock); + pthread_rwlock_wrlock(&ai.lock); frcti = &(ai.frcti[fd]); -- cgit v1.2.3