[PATCH 4/4] Use FreePixmap to free the fbPixmap in case the driver forgot
Keith Packard
keithp at keithp.com
Fri May 7 23:19:21 PDT 2010
If the driver fails to free the screen pixmap in its CloseScreen
function, fb is about the only place available. This probably
shouldn't be done though; it won't clean up the pixmap correctly.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
fb/fbscreen.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index 53e2ada..fab55ef 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -36,7 +36,10 @@ fbCloseScreen (int index, ScreenPtr pScreen)
xfree (depths[d].vids);
xfree (depths);
xfree (pScreen->visuals);
- xfree (pScreen->devPrivate);
+ if (pScreen->devPrivate) {
+ FreePixmap(pScreen->devPrivate);
+ pScreen->devPrivate = NULL;
+ }
#ifdef FB_SCREEN_PRIVATE
xfree (dixLookupPrivate(&pScreen->devPrivates, fbGetScreenPrivateKey()));
#endif
--
1.7.0.4
More information about the xorg-devel
mailing list