summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2009-09-13 22:21:49 +0200
committerMatthieu Herrb <matthieu.herrb@laas.fr>2009-09-13 22:25:35 +0200
commit872c691cbad253e4670a98349395b650677269cd (patch)
treedeed479662535c25e5e8d92ddc70bb043f277948
parentffe84aa5f99cb95467c86fc914724496cab53952 (diff)
Call shadowRemove() in wsfbCloseScreen().
This fixes a free memory dereference on exit. Hint by Daniel Stone. Thanks. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
-rw-r--r--src/wsfb_driver.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wsfb_driver.c b/src/wsfb_driver.c
index f5f486a..0e4b88d 100644
--- a/src/wsfb_driver.c
+++ b/src/wsfb_driver.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsfb_driver.c,v 1.15 2009/06/01 20:57:20 matthieu Exp $ */
+/* $OpenBSD: wsfb_driver.c,v 1.16 2009/09/13 19:33:49 matthieu Exp $ */
/*
* Copyright (c) 2001 Matthieu Herrb
* All rights reserved.
@@ -942,10 +942,15 @@ static Bool
WsfbCloseScreen(int scrnIndex, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ PixmapPtr pPixmap;
WsfbPtr fPtr = WSFBPTR(pScrn);
+
TRACE_ENTER("WsfbCloseScreen");
+ pPixmap = pScreen->GetScreenPixmap(pScreen);
+ shadowRemove(pScreen, pPixmap);
+
if (pScrn->vtSema) {
WsfbRestore(pScrn);
if (munmap(fPtr->fbmem, fPtr->fbmem_len) == -1) {