diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-09-13 19:33:50 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-09-13 19:33:50 +0000 |
commit | fbed40d3d06d0ddf2fdba36882425fd83ec6266b (patch) | |
tree | 8d791e246f91c99eed0a33db86be0fa20367a65e /driver/xf86-video-wsfb | |
parent | 4771a1ba648353b179cb377d82a61e9bb7aea395 (diff) |
Call shadowRemove() in wsfbCloseScreen(). This fixes a free
memory dereference on exit. Hint by Daniel Stone. Thanks.
Diffstat (limited to 'driver/xf86-video-wsfb')
-rw-r--r-- | driver/xf86-video-wsfb/src/wsfb_driver.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/driver/xf86-video-wsfb/src/wsfb_driver.c b/driver/xf86-video-wsfb/src/wsfb_driver.c index 1dcbac912..8d916ac7b 100644 --- a/driver/xf86-video-wsfb/src/wsfb_driver.c +++ b/driver/xf86-video-wsfb/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. @@ -1077,10 +1077,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) { |