[Intel-gfx] [PATCH] Destroy screen pixmap on screen close.

Keith Packard keithp at keithp.com
Thu Jul 1 15:56:40 CEST 2010


This avoids a memory leak on server reset.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 uxa/uxa.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/uxa/uxa.c b/uxa/uxa.c
index a9a705c..dcfaaa9 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
@@ -381,6 +381,8 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen)
 
 	uxa_glyphs_fini(pScreen);
 
+	(void) (*pScreen->DestroyPixmap) (pScreen->devPrivate);
+	pScreen->devPrivate = NULL;
 	pScreen->CreateGC = uxa_screen->SavedCreateGC;
 	pScreen->CloseScreen = uxa_screen->SavedCloseScreen;
 	pScreen->GetImage = uxa_screen->SavedGetImage;
-- 
1.7.1




More information about the Intel-gfx mailing list