uxa/uxa.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit bbbdd4607c4d7614d639f9d11f0db2173c5fa6b1 Author: Keith Packard <kei...@keithp.com> Date: Thu Jul 1 09:56:40 2010 -0400 Destroy screen pixmap on screen close. This avoids a memory leak on server reset. Signed-off-by: Keith Packard <kei...@keithp.com> [ickle: Added comments from Keith that explain the necessity of destroying the pixmap ourselves and why chaining up in this instance is not the correct approach.] Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk> (cherry picked from commit e30f0338fbf894fa3fdab20f4f9a97495cd341da) diff --git a/uxa/uxa.c b/uxa/uxa.c index 2321a7f..4a5907e 100644 --- a/uxa/uxa.c +++ b/uxa/uxa.c @@ -1,7 +1,7 @@ /* - * Copyright � 2001 Keith Packard + * Copyright © 2001 Keith Packard * - * Partly based on code that is Copyright � The XFree86 Project Inc. + * Partly based on code that is Copyright © The XFree86 Project Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -385,6 +385,13 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen) uxa_glyphs_fini(pScreen); + /* Destroy the pixmap created by miScreenInit() *before* chaining up as + * we finalize ourselves here and so this is the last chance we have of + * releasing our resources associated with the Pixmap. So do it first. + */ + (void) (*pScreen->DestroyPixmap) (pScreen->devPrivate); + pScreen->devPrivate = NULL; + pScreen->CreateGC = uxa_screen->SavedCreateGC; pScreen->CloseScreen = uxa_screen->SavedCloseScreen; pScreen->GetImage = uxa_screen->SavedGetImage; -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1p7xnd-0005zl...@alioth.debian.org