aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-07-15 12:12:16 -0600
committerJens Axboe <axboe@kernel.dk>2021-07-15 12:12:16 -0600
commit5c91cd3eab05bcfe8dd1b7bb324693c931501b8f (patch)
tree07524db24027b52c10498e4fcd7af334cea76916
parent23dd1aef21e0e8690850bde7016eec8d8f8a392e (diff)
downloadliburing-5c91cd3eab05bcfe8dd1b7bb324693c931501b8f.tar.gz
test/send_recvmsg: drop mutex on thread creation failure
Fixes: https://github.com/axboe/liburing/issues/382 Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/send_recvmsg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/send_recvmsg.c b/test/send_recvmsg.c
index 6b513bc..2ff8d9d 100644
--- a/test/send_recvmsg.c
+++ b/test/send_recvmsg.c
@@ -297,6 +297,7 @@ static int test(int buf_select, int no_buf_add, int iov_count)
rd.iov_count = iov_count;
ret = pthread_create(&recv_thread, NULL, recv_fn, &rd);
if (ret) {
+ pthread_mutex_unlock(&mutex);
fprintf(stderr, "Thread create failed\n");
return 1;
}