summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2016-05-06 10:46:14 +1000
committerAdam Jackson <ajax@redhat.com>2016-06-08 12:51:51 -0400
commita6b6e8ba026acedef6336b17adf06aebddd5f22f (patch)
tree17087dc2c6efbc2551382ff27761524bb800a541 /randr
parentaa5390aa83be55f887e3b4f78681b4f3d3386eb5 (diff)
prime: clean up slave bo properly. (v3)
This is an ABI break, in that we now pass NULL to a function that hasn't accepted it before. Alex Goins had a different patch for this but it wasn't symmetrical, it freed something in a very different place than it allocated it, this attempts to retain symmetry in the releasing of the backing bo. v2: use a new toplevel API, though it still passes NULL to something that wasn't expecting it. v3: pass -1 instead of 0. Signed-off-by: Dave Airlie <airlied@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Alex Goins <agoins at nvidia.com>
Diffstat (limited to 'randr')
-rw-r--r--randr/rrcrtc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 566a3dbc6..54471332d 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -373,6 +373,8 @@ rrDestroySharedPixmap(RRCrtcPtr crtc, PixmapPtr pPixmap) {
* Unref the pixmap twice: once for the original reference, and once
* for the reference implicitly added by PixmapShareToSlave.
*/
+ PixmapUnshareSlavePixmap(pPixmap);
+
master->DestroyPixmap(pPixmap->master_pixmap);
master->DestroyPixmap(pPixmap->master_pixmap);
}