Skip to content

Commit

Permalink
[input] always unlock on pthread_cond_wait() error #2837
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Jan 30, 2025
1 parent 73e8344 commit 333455e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/in.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 333455e

Please sign in to comment.