diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-03-25 19:21:03 +0200 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-04-04 15:41:13 +0300 |
commit | dce2f10cf7bef9929cefadb5088d5b66df43a865 (patch) | |
tree | 651a86f0ee5086810d8f3a9e710de0342f7a1a49 /fb | |
parent | 8ab92cd9822510f426d179a636ef34bb0ace3bb3 (diff) |
mi: fix memory leak in miInitVisuals
Free the pointers inside miInitVisuals, so the callers of this function
(fboverlay.c and fbscreen.c) don't need to worry with deallocation in the case
of failure.
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>
Diffstat (limited to 'fb')
-rw-r--r-- | fb/fbscreen.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fb/fbscreen.c b/fb/fbscreen.c index fa518f64a..9e6ecf50f 100644 --- a/fb/fbscreen.c +++ b/fb/fbscreen.c @@ -221,11 +221,7 @@ fbFinishScreenInit(ScreenPtr pScreen, rootdepth = 0; if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, &defaultVisual,((unsigned long)1<<(imagebpp-1)), 8)) - { - free(visuals); - free(depths); return FALSE; - } if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, rootdepth, ndepths, depths, defaultVisual, nvisuals, visuals)) |