xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Thu Jul 3 13:00:25 PDT 2014


 fb/fbscreen.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 10d2805dbc6b96a159b8c5acedcd53f34df362bf
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jun 26 14:12:24 2014 -0700

    fb: Don't free NULL pixmap in fbCloseScreen. Bug #80313
    
    We fixed fbCloseScreen to use the FreePixmap function so that the
    private counts would be updated correctly during CloseScreen. Xvfb
    calls FreePixmap and sets devPrivate to NULL before fbCloseScreen is
    called; not checking devPrivate before calling would result in a NULL
    pointer dereference.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Reviewed-by: Julien Cristau <jcristau at debian.org>

diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index 1f91089..0d4d87f 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -37,7 +37,8 @@ fbCloseScreen(ScreenPtr pScreen)
         free(depths[d].vids);
     free(depths);
     free(pScreen->visuals);
-    FreePixmap((PixmapPtr)pScreen->devPrivate);
+    if (pScreen->devPrivate)
+        FreePixmap((PixmapPtr)pScreen->devPrivate);
     return TRUE;
 }
 


More information about the xorg-commit mailing list