mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Don't do anything in the client callback if the client has already died to
avoid a use-after-free (the callback is used twice, once for the client itself and once for the tty). Fixes crashes seen by Han Boetes.
This commit is contained in:
		@@ -153,6 +153,9 @@ server_client_callback(int fd, int events, void *data)
 | 
			
		||||
{
 | 
			
		||||
	struct client	*c = data;
 | 
			
		||||
 | 
			
		||||
	if (c->flags & CLIENT_DEAD)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if (fd == c->ibuf.fd) {
 | 
			
		||||
		if (events & (POLLERR|POLLNVAL|POLLHUP))
 | 
			
		||||
			goto client_lost;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user