aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrcrtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr/rrcrtc.c')
-rw-r--r--xorg-server/randr/rrcrtc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c
index 859d19efe..063be0477 100644
--- a/xorg-server/randr/rrcrtc.c
+++ b/xorg-server/randr/rrcrtc.c
@@ -373,6 +373,11 @@ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc)
ret = pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL);
if (crtc->scanout_pixmap) {
master->StopPixmapTracking(mscreenpix, crtc->scanout_pixmap);
+ /*
+ * Unref the pixmap twice: once for the original reference, and once
+ * for the reference implicitly added by PixmapShareToSlave.
+ */
+ master->DestroyPixmap(crtc->scanout_pixmap->master_pixmap);
master->DestroyPixmap(crtc->scanout_pixmap->master_pixmap);
crtc->pScreen->DestroyPixmap(crtc->scanout_pixmap);
}