• Ulrich Sibiller's avatar
    mi/miinitext.c: fix memleaks: remove (double) glx initialization · 5cb49714
    Ulrich Sibiller authored
    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?).
    5cb49714
Name
Last commit
Last update
debian Loading commit data...
doc Loading commit data...
etc Loading commit data...
m4 Loading commit data...
nx-X11 Loading commit data...
nxcomp Loading commit data...
nxcompshad Loading commit data...
nxdialog Loading commit data...
nxproxy Loading commit data...
testscripts Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
LICENSE Loading commit data...
LICENSE.nxcomp Loading commit data...
Makefile Loading commit data...
README.NX-development Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
fix-patch-whitespace Loading commit data...
make-changelog.sh Loading commit data...
mesa-quilt Loading commit data...
nx-libs.spec Loading commit data...
regenerate-symbol-docs.sh Loading commit data...
replace.sh Loading commit data...
roll-tarballs.sh Loading commit data...
run-static-analysis.sh Loading commit data...
version.sh Loading commit data...