]> git.draconx.ca Git - gentoo-draconx.git/blob - x11-base/xorg-server/files/0001-xaa-Free-the-scratch-pixmap-header-before-freeing-th.patch
8ce2673a2793a3e115eae86560c982011ca0b67e
[gentoo-draconx.git] / x11-base / xorg-server / files / 0001-xaa-Free-the-scratch-pixmap-header-before-freeing-th.patch
1 From 6c51a336f31c63167beb48bf0512cd13feac70a2 Mon Sep 17 00:00:00 2001
2 From: Chris Wilson <chris@chris-wilson.co.uk>
3 Date: Mon, 6 Jun 2011 05:36:06 +0000
4 Subject: [PATCH 1/4] xaa: Free the scratch pixmap header before freeing the contents
5
6 Some DDX may be sensitive to the ordering and could conceivably continue
7 to use the memory freed before FreeScratchPixmapHeader is called.
8
9 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 ---
11  hw/xfree86/xaa/xaaOffscreen.c |    5 ++---
12  1 files changed, 2 insertions(+), 3 deletions(-)
13
14 diff --git a/hw/xfree86/xaa/xaaOffscreen.c b/hw/xfree86/xaa/xaaOffscreen.c
15 index cd0d9a9..8fa5d6d 100644
16 --- a/hw/xfree86/xaa/xaaOffscreen.c
17 +++ b/hw/xfree86/xaa/xaaOffscreen.c
18 @@ -90,12 +90,11 @@ XAAMoveInOffscreenPixmaps(ScreenPtr pScreen)
19         (*pGC->ops->CopyArea)((DrawablePtr)tmpPix, (DrawablePtr)pPix, pGC, 
20                 0, 0, pPix->drawable.width, pPix->drawable.height, 0, 0);       
21  
22 -       free(data);
23 -       tmpPix->devPrivate.ptr = NULL;
24 -
25         FreeScratchGC(pGC);
26         FreeScratchPixmapHeader(tmpPix);
27  
28 +       free(data);
29 +
30         pPriv->offscreenArea = area;
31         pLink->area = NULL;
32         pLink = pLink->next;
33 -- 
34 1.7.3.4
35