From 1872869e6ffcc8e6cab820c508fe5404d7e8ff9c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 1 May 2009 11:46:51 -0700 Subject: [PATCH] Leave allocator running until lower-level CloseScreens are done The lower level close screen functions will free allocated objects, causing a crash if the allocator isn't still available. Signed-off-by: Keith Packard --- src/i830_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index 1ff58668..ff7124df 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3079,7 +3079,6 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen) xf86_cursors_fini (pScreen); - i830_allocator_fini(pScrn); i965_free_video(pScrn); free(pI830->offscreenImages); @@ -3099,7 +3098,9 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen) pScrn->vtSema = FALSE; pI830->closing = FALSE; pScreen->CloseScreen = pI830->CloseScreen; - return (*pScreen->CloseScreen) (scrnIndex, pScreen); + (*pScreen->CloseScreen) (scrnIndex, pScreen); + i830_allocator_fini(pScrn); + return TRUE; } static ModeStatus