public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] intel uxa: Fix use-after-free
@ 2012-06-19 15:53 Maarten Lankhorst
  0 siblings, 0 replies; only message in thread
From: Maarten Lankhorst @ 2012-06-19 15:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

white is set to src if used, but src can be used in the maskFormat too.
Fixes crash when logging in on a sandybridge laptop.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>

---

diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index e83464e..4b81756 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -538,9 +538,6 @@ uxa_check_glyphs(CARD8 op,
 		list++;
 	}
 
-	if (white)
-		FreePicture(white, 0);
-
 	if (maskFormat) {
 		x = extents.x1;
 		y = extents.y1;
@@ -554,6 +551,9 @@ uxa_check_glyphs(CARD8 op,
 		FreeScratchPixmapHeader(scratch);
 		pixman_image_unref(image);
 	}
+
+	if (white)
+		FreePicture(white, 0);
 }
 
 static inline unsigned int

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-19 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-19 15:53 [PATCH] intel uxa: Fix use-after-free Maarten Lankhorst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox