From 333455e7927106c578ac778078dfd3d2b60fd604 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 23 Jan 2025 14:59:39 -0500 Subject: [PATCH] [input] always unlock on pthread_cond_wait() error #2837 --- src/lib/in.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/in.c b/src/lib/in.c index 68584a399..e06f62af0 100644 --- a/src/lib/in.c +++ b/src/lib/in.c @@ -2709,12 +2709,11 @@ internal_get(inputctx* ictx, const struct timespec* ts, ncinput* ni){ if(r){ pthread_mutex_unlock(&ictx->ilock); if(r == ETIMEDOUT){ - pthread_mutex_unlock(&ictx->ilock); if(ni){ memset(ni, 0, sizeof(*ni)); } return 0; - }else if(r < 0){ + }else{ inc_input_errors(ictx); if(ni){ memset(ni, 0, sizeof(*ni));