fb: Don't free NULL pixmap in fbCloseScreen. Bug #80313
We fixed fbCloseScreen to use the FreePixmap function so that the private counts would be updated correctly during CloseScreen. Xvfb calls FreePixmap and sets devPrivate to NULL before fbCloseScreen is called; not checking devPrivate before calling would result in a NULL pointer dereference. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
parent
a3b44ad8db
commit
10d2805dbc
|
@ -37,7 +37,8 @@ fbCloseScreen(ScreenPtr pScreen)
|
|||
free(depths[d].vids);
|
||||
free(depths);
|
||||
free(pScreen->visuals);
|
||||
FreePixmap((PixmapPtr)pScreen->devPrivate);
|
||||
if (pScreen->devPrivate)
|
||||
FreePixmap((PixmapPtr)pScreen->devPrivate);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue