Same fix as in wsfb:

Call shadowRemove() in wsfbCloseScreen(). This fixes a free
memory dereference on exit. Hint by Daniel Stone. Thanks.
This commit is contained in:
matthieu 2009-09-13 19:46:47 +00:00
parent 5331f4bab2
commit e10bf73c09

View File

@ -1,4 +1,4 @@
/* $OpenBSD: wildcatfb_driver.c,v 1.1.1.1 2009/01/01 19:29:22 miod Exp $ */
/* $OpenBSD: wildcatfb_driver.c,v 1.2 2009/09/13 19:46:47 matthieu Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@ -753,9 +753,12 @@ WildcatFBCloseScreen(int scrnIndex, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
WildcatFBPtr fPtr = WILDCATFBPTR(pScrn);
PixmapPtr pPixmap = pScreen->GetScreenPixmap(pScreen);
TRACE_ENTER("WildcatFBCloseScreen");
shadowRemove(pScreen, pPixmap);
if (pScrn->vtSema) {
WildcatFBRestore(pScrn);
if (munmap(fPtr->ov0, fPtr->ov_len) == -1) {