mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 15:00:09 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user