Blame SOURCES/0001-present-wnmd-Keep-pixmap-pointer-in-present_wnmd_cle.patch

315c3e
From f32c851a0ba41f5d8d0f8c869bc394858de721df Mon Sep 17 00:00:00 2001
315c3e
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
315c3e
Date: Thu, 25 Jun 2020 18:09:27 +0200
315c3e
Subject: [PATCH xserver 1/4] present/wnmd: Keep pixmap pointer in
315c3e
 present_wnmd_clear_window_flip
315c3e
MIME-Version: 1.0
315c3e
Content-Type: text/plain; charset=UTF-8
315c3e
Content-Transfer-Encoding: 8bit
315c3e
315c3e
The comment was incorrect: Any reference held by the window (see
315c3e
present_wnmd_execute) is in addition to the one in struct present_vblank
315c3e
(see present_vblank_create). So if we don't drop the latter, the pixmap
315c3e
will be leaked.
315c3e
315c3e
Reviewed-by: Dave Airlie <airlied@redhat.com>
315c3e
(cherry picked from commit bc9dd1c71c3722284ffaa7183f4119151b25a44f)
315c3e
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
315c3e
---
315c3e
 present/present_screen.c | 2 --
315c3e
 1 file changed, 2 deletions(-)
315c3e
315c3e
diff --git a/present/present_screen.c b/present/present_screen.c
315c3e
index c7e37c5fd..c435f55f4 100644
315c3e
--- a/present/present_screen.c
315c3e
+++ b/present/present_screen.c
315c3e
@@ -122,8 +122,6 @@ present_wnmd_clear_window_flip(WindowPtr window)
315c3e
 
315c3e
     xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) {
315c3e
         present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
315c3e
-        /* The pixmap will be destroyed by freeing the window resources. */
315c3e
-        vblank->pixmap = NULL;
315c3e
         present_vblank_destroy(vblank);
315c3e
     }
315c3e
 
315c3e
-- 
315c3e
2.26.2
315c3e