aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-06-20 00:42:01 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-06-22 11:30:47 +0200
commit9f9b790f855f4a969b4ae6730e9cad8a9e743a3a (patch)
tree463a88cfe922e0f345b17f33811ff017da607c64
parentf55402572cc659888be7ace585bea8c8fcb7db32 (diff)
downloadnx-libs-9f9b790f855f4a969b4ae6730e9cad8a9e743a3a.tar.gz
nx-libs-9f9b790f855f4a969b4ae6730e9cad8a9e743a3a.tar.bz2
nx-libs-9f9b790f855f4a969b4ae6730e9cad8a9e743a3a.zip
fb: fix memory leak in fbOverlayFinishScreenInit
commit 2aa935bc5cc1e2d5365a97b8c5bb3d33eb5fc758 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 22:10:55 2011 +0200 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>
-rw-r--r--nx-X11/programs/Xserver/fb/fboverlay.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/fb/fboverlay.c b/nx-X11/programs/Xserver/fb/fboverlay.c
index 6e0bbf252..95101a731 100644
--- a/nx-X11/programs/Xserver/fb/fboverlay.c
+++ b/nx-X11/programs/Xserver/fb/fboverlay.c
@@ -410,16 +410,20 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1,
&defaultVisual, ((unsigned long)1<<(bpp1-1)) |
- ((unsigned long)1<<(bpp2-1)), 8))
+ ((unsigned long)1<<(bpp2-1)), 8)) {
+ free(pScrPriv);
return FALSE;
+ }
if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0,
depth1, ndepths, depths,
defaultVisual, nvisuals, visuals
#ifdef FB_OLD_MISCREENINIT
, (miBSFuncPtr) 0
#endif
- ))
+ )) {
+ free(pScrPriv);
return FALSE;
+ }
/* MI thinks there's no frame buffer */
#ifdef MITSHM
ShmRegisterFbFuncs(pScreen);