diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-06-13 18:34:11 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-06-16 15:20:56 +0900 |
commit | 397aedafee437c125b8ac1feafb1c3b466842aeb (patch) | |
tree | a92db8c2f6ece4e71993bda48bd36e5e3fb80f15 | |
parent | 5b4a8a7a6ed70a50be252fa9b34d3b3a17cdf91a (diff) |
glamor: Fix leak of pixmap private when replacing BO
Reported-by: Qiang Yu <qiang.yu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/amdgpu_glamor.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c index 9785ad7..62831d0 100644 --- a/src/amdgpu_glamor.c +++ b/src/amdgpu_glamor.c @@ -303,10 +303,9 @@ amdgpu_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap) FreeScratchGC(gc); } - amdgpu_set_pixmap_private(pixmap, NULL); - /* And redirect the pixmap to the new bo (for 3D). */ glamor_egl_exchange_buffers(old, pixmap); + amdgpu_set_pixmap_private(pixmap, amdgpu_get_pixmap_private(old)); amdgpu_set_pixmap_private(old, priv); screen->ModifyPixmapHeader(old, |