present/wnmd: Free flip_queue entries in present_wnmd_clear_window_flip
When present_wnmd_clear_window_flip is done, present_destroy_window
frees struct present_window_priv, and the events in the flip queue
become unreachable. So if we don't free them first, they're leaked.
Also drop the call to present_wnmd_set_abort_flip, which just sets a
flag in struct present_window_priv and thus can't have any observable
effect after present_destroy_window.
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1042
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 1bdedc8dbb)
			
			
This commit is contained in:
		
							parent
							
								
									b3310ed503
								
							
						
					
					
						commit
						ba52e5eb0e
					
				|  | @ -115,9 +115,9 @@ present_wnmd_clear_window_flip(WindowPtr window) | ||||||
|     present_window_priv_ptr     window_priv = present_window_priv(window); |     present_window_priv_ptr     window_priv = present_window_priv(window); | ||||||
|     present_vblank_ptr          vblank, tmp; |     present_vblank_ptr          vblank, tmp; | ||||||
| 
 | 
 | ||||||
|     if (window_priv->flip_pending) { |     xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->flip_queue, event_queue) { | ||||||
|         present_wnmd_set_abort_flip(window); |         present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence); | ||||||
|         window_priv->flip_pending->window = NULL; |         present_vblank_destroy(vblank); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) { |     xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue