mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	client: Don't inappropriatly close fds for zombie objects
commit 239ba39331 which was intended
to stop leaking fds in events for zombie objects didn't notice that
passing 0 to wl_connection_close_fds_in() would still close fds.
Test the fd count before calling.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
			
			
This commit is contained in:
		
							parent
							
								
									97351f995c
								
							
						
					
					
						commit
						a9187853d4
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -1359,7 +1359,7 @@ queue_event(struct wl_display *display, int len)
 | 
				
			||||||
	if (!proxy || wl_object_is_zombie(&display->objects, id)) {
 | 
						if (!proxy || wl_object_is_zombie(&display->objects, id)) {
 | 
				
			||||||
		struct wl_zombie *zombie = wl_map_lookup(&display->objects, id);
 | 
							struct wl_zombie *zombie = wl_map_lookup(&display->objects, id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (zombie)
 | 
							if (zombie && zombie->fd_count[opcode]) {
 | 
				
			||||||
			wl_connection_close_fds_in(display->connection,
 | 
								wl_connection_close_fds_in(display->connection,
 | 
				
			||||||
						   zombie->fd_count[opcode]);
 | 
											   zombie->fd_count[opcode]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue