Skip to content

Commit ab0e339

Browse files
committed
Protect changes to conn->req_count with mutex.
1 parent b19e3b8 commit ab0e339

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sshfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,9 @@ static int sftp_read(struct conn *conn, uint8_t *type, struct buffer *buf)
13931393

13941394
static void request_free(struct request *req)
13951395
{
1396+
pthread_mutex_lock(&sshfs.lock);
13961397
req->conn->req_count--;
1398+
pthread_mutex_unlock(&sshfs.lock);
13971399
buf_free(&req->reply);
13981400
sem_destroy(&req->ready);
13991401
g_free(req);

0 commit comments

Comments
 (0)