From 981af18190be772b469761bc124b9f46c19d5093 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 8 Jun 2014 16:55:07 +0100 Subject: [PATCH] uxa: Do not FreePixmap(screen->devPrivate) Prevent the crash caused by commit 444a1f7a8802999e27ecf5f6eb598df2206f7277 Author: Brendan King Date: Thu Apr 24 11:37:45 2014 +0100 fb: fix screen pixmap leak on server reset Call FreePixmap() instead of free() to destroy the screen pixmap in fbCloseScreen(). Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard Signed-off-by: Chris Wilson --- src/uxa/uxa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uxa/uxa.c b/src/uxa/uxa.c index 2635b502..c8d79002 100644 --- a/src/uxa/uxa.c +++ b/src/uxa/uxa.c @@ -382,6 +382,7 @@ static Bool uxa_close_screen(CLOSE_SCREEN_ARGS_DECL) uxa_glyphs_fini(screen); +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,15,99,903,0) if (screen->devPrivate) { /* Destroy the pixmap created by miScreenInit() *before* * chaining up as we finalize ourselves here and so this @@ -391,6 +392,7 @@ static Bool uxa_close_screen(CLOSE_SCREEN_ARGS_DECL) (void) (*screen->DestroyPixmap) (screen->devPrivate); screen->devPrivate = NULL; } +#endif screen->CreateGC = uxa_screen->SavedCreateGC; screen->CloseScreen = uxa_screen->SavedCloseScreen;