Call shadowRemove() in wsfbCloseScreen(). This fixes a free
memory dereference on exit. Hint by Daniel Stone. Thanks.
This commit is contained in:
parent
00a307f8e4
commit
5331f4bab2
@ -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
|
* Copyright (c) 2001 Matthieu Herrb
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -1077,10 +1077,15 @@ static Bool
|
|||||||
WsfbCloseScreen(int scrnIndex, ScreenPtr pScreen)
|
WsfbCloseScreen(int scrnIndex, ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
||||||
|
PixmapPtr pPixmap;
|
||||||
WsfbPtr fPtr = WSFBPTR(pScrn);
|
WsfbPtr fPtr = WSFBPTR(pScrn);
|
||||||
|
|
||||||
|
|
||||||
TRACE_ENTER("WsfbCloseScreen");
|
TRACE_ENTER("WsfbCloseScreen");
|
||||||
|
|
||||||
|
pPixmap = pScreen->GetScreenPixmap(pScreen);
|
||||||
|
shadowRemove(pScreen, pPixmap);
|
||||||
|
|
||||||
if (pScrn->vtSema) {
|
if (pScrn->vtSema) {
|
||||||
WsfbRestore(pScrn);
|
WsfbRestore(pScrn);
|
||||||
if (munmap(fPtr->fbmem, fPtr->fbmem_len) == -1) {
|
if (munmap(fPtr->fbmem, fPtr->fbmem_len) == -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user