fb: fix memory leak in fbOverlayFinishScreenInit
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
4d87606a0d
commit
2aa935bc5c
|
@ -384,12 +384,16 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
||||||
|
|
||||||
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1,
|
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1,
|
||||||
&defaultVisual, ((unsigned long)1<<(bpp1-1)) |
|
&defaultVisual, ((unsigned long)1<<(bpp1-1)) |
|
||||||
((unsigned long)1<<(bpp2-1)), 8))
|
((unsigned long)1<<(bpp2-1)), 8)) {
|
||||||
|
free(pScrPriv);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0,
|
if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0,
|
||||||
depth1, ndepths, depths,
|
depth1, ndepths, depths,
|
||||||
defaultVisual, nvisuals, visuals))
|
defaultVisual, nvisuals, visuals)) {
|
||||||
|
free(pScrPriv);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
/* MI thinks there's no frame buffer */
|
/* MI thinks there's no frame buffer */
|
||||||
#ifdef MITSHM
|
#ifdef MITSHM
|
||||||
ShmRegisterFbFuncs(pScreen);
|
ShmRegisterFbFuncs(pScreen);
|
||||||
|
|
Loading…
Reference in New Issue