mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	tablet_v2: destroy tablet seats on manager destroy
This fixes an invalid write in tablet_seat_destroy if the tablet manager is destroyed before the wlr_seat.
This commit is contained in:
		
							parent
							
								
									0e5034d8ba
								
							
						
					
					
						commit
						5bef385ffc
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -271,6 +271,12 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
 | 
				
			||||||
		wl_container_of(listener, manager, display_destroy);
 | 
							wl_container_of(listener, manager, display_destroy);
 | 
				
			||||||
	wl_signal_emit_mutable(&manager->events.destroy, manager);
 | 
						wl_signal_emit_mutable(&manager->events.destroy, manager);
 | 
				
			||||||
	wl_list_remove(&manager->display_destroy.link);
 | 
						wl_list_remove(&manager->display_destroy.link);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						struct wlr_tablet_seat_v2 *seat, *tmp;
 | 
				
			||||||
 | 
						wl_list_for_each_safe(seat, tmp, &manager->seats, link) {
 | 
				
			||||||
 | 
							tablet_seat_destroy(seat);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wl_global_destroy(manager->wl_global);
 | 
						wl_global_destroy(manager->wl_global);
 | 
				
			||||||
	free(manager);
 | 
						free(manager);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue