[get_cursor_location] unlock on error path, erp #2558

This commit is contained in:
nick black 2022-01-15 13:02:26 -05:00
parent 285aa9d92a
commit 792dbf9a59
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -2662,6 +2662,7 @@ int get_cursor_location(inputctx* ictx, const char* u7, unsigned* y, unsigned* x
while(ictx->cvalid == 0){
if(ictx->coutstanding == 0){
if(tty_emit(u7, ictx->ti->ttyfd)){
pthread_mutex_unlock(&ictx->clock);
return -1;
}
++ictx->coutstanding;