aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2018-09-26 22:05:00 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2018-09-26 22:05:00 +0200
commit886270ba9264a60dc0d37ee48e49c99bd0e022bf (patch)
tree1c3a4171e795417f98baaafa53063aae4b3e74ff
parent8ee5d4b415403d57a0669be5fa7605491b988c74 (diff)
downloadlibrb-886270ba9264a60dc0d37ee48e49c99bd0e022bf.tar.gz
librb-886270ba9264a60dc0d37ee48e49c99bd0e022bf.tar.bz2
librb-886270ba9264a60dc0d37ee48e49c99bd0e022bf.zip
fix: read mutex remains locked after select() fails
-rw-r--r--rb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rb.c b/rb.c
index 026a761..a16c7ec 100644
--- a/rb.c
+++ b/rb.c
@@ -947,6 +947,8 @@ static long rb_recvt
pthread_mutex_unlock(&rb->lock);
trace(("i/rb unlock"));
+ pthread_mutex_unlock(&rb->rlock);
+ trace(("read unlock"));
return -1;
}