Skip to content
Snippets Groups Projects
Commit c7fa6a0a authored by Dave Airlie's avatar Dave Airlie
Browse files

fboverlay: move bpp checks above malloc


Avoids having to free the malloced object.

Pointed out by coverity.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 51ae6126
No related branches found
No related tags found
No related merge requests found
......@@ -279,11 +279,11 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
(&fbOverlayScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
pScrPriv = malloc(sizeof(FbOverlayScrPrivRec));
if (!pScrPriv)
if (bpp1 == 24 || bpp2 == 24)
return FALSE;
if (bpp1 == 24 || bpp2 == 24)
pScrPriv = malloc(sizeof(FbOverlayScrPrivRec));
if (!pScrPriv)
return FALSE;
if (!fbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &depth1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment