uxa: Do not FreePixmap(screen->devPrivate)

Prevent the crash caused by

commit 444a1f7a8802999e27ecf5f6eb598df2206f7277
Author: Brendan King <brendan.king@imgtec.com>
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 <frank.binns@imgtec.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-06-08 16:55:07 +01:00
parent 86f2cae450
commit 981af18190
1 changed files with 2 additions and 0 deletions

View File

@ -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;