summaryrefslogtreecommitdiff
path: root/src/radeon_glamor.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-09-13 18:18:37 +0900
committerMichel Dänzer <michel@daenzer.net>2016-09-21 18:20:19 +0900
commit50abcc19e29bb50451d031b2c9e99d691d4faf70 (patch)
tree475f2065cca6244e652f3e0ceb629848212dd2a3 /src/radeon_glamor.c
parent8523a733b6a5de6116a6332fefc871d4c32652d8 (diff)
glamor: Fix leak of pixmap private when replacing BO
Reported-by: Qiang Yu <qiang.yu@amd.com> (Ported from amdgpu commit 397aedafee437c125b8ac1feafb1c3b466842aeb)
Diffstat (limited to 'src/radeon_glamor.c')
-rw-r--r--src/radeon_glamor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index 7a6bf534..b66848fc 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -314,10 +314,9 @@ radeon_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap)
FreeScratchGC(gc);
}
- radeon_set_pixmap_private(pixmap, NULL);
-
/* And redirect the pixmap to the new bo (for 3D). */
glamor_egl_exchange_buffers(old, pixmap);
+ radeon_set_pixmap_private(pixmap, radeon_get_pixmap_private(old));
radeon_set_pixmap_private(old, priv);
screen->ModifyPixmapHeader(old,