aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-06-18 18:57:17 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-06-19 00:49:57 +0200
commit5cb497146091acf84f389f6b459f5d2f8ea86643 (patch)
tree851e0b3268aebf1773a49638aa0b2d539404bdb4 /nx-X11/programs/Xserver
parent7564422263a10ec8992e538bb741b2ddb51dad82 (diff)
downloadnx-libs-5cb497146091acf84f389f6b459f5d2f8ea86643.tar.gz
nx-libs-5cb497146091acf84f389f6b459f5d2f8ea86643.tar.bz2
nx-libs-5cb497146091acf84f389f6b459f5d2f8ea86643.zip
mi/miinitext.c: fix memleaks: remove (double) glx initialization
Fix these memory leaks: ==30021== 128 bytes in 1 blocks are definitely lost in loss record 230 of 302 ==30021== at 0x483577F: malloc (vg_replace_malloc.c:299) ==30021== by 0x2EF89C: init_visuals (xf86glx.c:390) ==30021== by 0x2EF89C: __MESA_initVisuals (xf86glx.c:541) ==30021== by 0x17C922: GlxInitVisuals (glxext.c:317) ==30021== by 0x218E73: fbInitVisuals (fbcmap.c:668) ==30021== by 0x20BEB1: fbFinishScreenInit (fbscreen.c:229) ==30021== by 0x20C275: fbScreenInit (fbscreen.c:273) ==30021== by 0x1E0317: nxagentOpenScreen (Screen.c:1357) ==30021== by 0x16D848: AddScreen (dispatch.c:4171) ==30021== by 0x1DB7FF: InitOutput (Init.c:396) ==30021== by 0x14DB12: main (main.c:279) ==30021== ==30021== 3,072 (192 direct, 2,880 indirect) bytes in 1 blocks are definitely lost in loss record 290 of 302 ==30021== at 0x483577F: malloc (vg_replace_malloc.c:299) ==30021== by 0x2CCCC7: _gl_context_modes_create (glcontextmodes.c:364) ==30021== by 0x2EF87C: init_visuals (xf86glx.c:381) ==30021== by 0x2EF87C: __MESA_initVisuals (xf86glx.c:541) ==30021== by 0x17C922: GlxInitVisuals (glxext.c:317) ==30021== by 0x218E73: fbInitVisuals (fbcmap.c:668) ==30021== by 0x20BEB1: fbFinishScreenInit (fbscreen.c:229) ==30021== by 0x20C275: fbScreenInit (fbscreen.c:273) ==30021== by 0x1E0317: nxagentOpenScreen (Screen.c:1357) ==30021== by 0x16D848: AddScreen (dispatch.c:4171) ==30021== by 0x1DB7FF: InitOutput (Init.c:396) ==30021== by 0x14DB12: main (main.c:279) The problem here is that GlxInitVisuals is called twice. First via fbScreenInit and then again via nxagentInitGlxExtension. We remove the first one to ensure the code in nxagenOpenScreen works as initially intended. There's an xorg upstream patch that does the same (7d74690536b64f7b8e8036507ab7790807349c50), but it also cleans up other stuff we do not even have in out source (yet?).
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/mi/miinitext.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c
index 9e0f82643..319cb1f2d 100644
--- a/nx-X11/programs/Xserver/mi/miinitext.c
+++ b/nx-X11/programs/Xserver/mi/miinitext.c
@@ -228,7 +228,6 @@ extern void GlxPushProvider(__GLXprovider *impl);
*/
#ifndef __DARWIN__
extern void GlxExtensionInit(void);
-extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
#else
extern void DarwinGlxExtensionInit(void);
extern void DarwinGlxWrapInitVisuals(miInitVisualsProcPtr *);
@@ -474,9 +473,7 @@ InitVisualWrap()
{
miResetInitVisuals();
#ifdef GLXEXT
-#ifndef __DARWIN__
- GlxWrapInitVisuals(&miInitVisualsProc);
-#else
+#ifdef __DARWIN__
DarwinGlxWrapInitVisuals(&miInitVisualsProc);
#endif
#endif