aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/fb/fbscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/fb/fbscreen.c')
-rw-r--r--xorg-server/fb/fbscreen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xorg-server/fb/fbscreen.c b/xorg-server/fb/fbscreen.c
index 24eadde1a..53e2ada9f 100644
--- a/xorg-server/fb/fbscreen.c
+++ b/xorg-server/fb/fbscreen.c
@@ -228,7 +228,11 @@ fbFinishScreenInit(ScreenPtr pScreen,
rootdepth = 0;
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
&defaultVisual,((unsigned long)1<<(imagebpp-1)), 8))
+ {
+ xfree (visuals);
+ xfree (depths);
return FALSE;
+ }
if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
rootdepth, ndepths, depths,
defaultVisual, nvisuals, visuals))