xserver: Branch 'master' - 4 commits

Adam Jackson ajax at kemper.freedesktop.org
Mon Nov 6 21:56:18 UTC 2017


 glx/glxscreens.c        |    7 +++++++
 hw/kdrive/ephyr/ephyr.c |    2 ++
 randr/rroutput.c        |    2 +-
 xkb/xkbUtils.c          |    2 +-
 4 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 4b0a3cbab131eb453e2b3fc0337121969258a7be
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Sat Nov 4 23:06:31 2017 +0100

    glx: free fbconfigs on destroy
    
    Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
    Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>

diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 99bf6dd27..73444152a 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -423,8 +423,15 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen)
 void
 __glXScreenDestroy(__GLXscreen * screen)
 {
+    __GLXconfig *config, *next;
+
     free(screen->glvnd);
     free(screen->GLXextensions);
     free(screen->GLextensions);
     free(screen->visuals);
+
+    for (config = screen->fbconfigs; config != NULL; config = next) {
+        next = config->next;
+        free(config);
+    }
 }
commit bb766ef11227bd8c71ac65845d1930edd0eda40d
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Sat Nov 4 23:06:29 2017 +0100

    randr: ProcRRGetOutputInfo: initialize memory
    
    Running Xephyr under valgrind reveals that we're sending some
    uninitialized memory over the wire (particularly, the leftover padding
    that comes from rounding extraLen to the next 32-bit multiple).
    
    Solve by calloc()ing the memory instead of malloc()ing (the alternative
    would be to memset just the padding, but I'm not sure it's more
    convenient.)
    
    Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/randr/rroutput.c b/randr/rroutput.c
index a8efec409..647f19a52 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -459,7 +459,7 @@ ProcRRGetOutputInfo(ClientPtr client)
 
     if (extraLen) {
         rep.length += bytes_to_int32(extraLen);
-        extra = malloc(extraLen);
+        extra = calloc(1, extraLen);
         if (!extra)
             return BadAlloc;
     }
commit 6828645916505a5925db5c2c2e816fee4e1050e5
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Sat Nov 4 23:06:28 2017 +0100

    Xephyr: free driverPrivates on Fini
    
    Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index d064f5154..acf389c1d 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -1303,6 +1303,7 @@ MouseDisable(KdPointerInfo * pi)
 static void
 MouseFini(KdPointerInfo * pi)
 {
+    free(pi->driverPrivate);
     ephyrMouse = NULL;
     return;
 }
@@ -1366,6 +1367,7 @@ EphyrKeyboardDisable(KdKeyboardInfo * ki)
 static void
 EphyrKeyboardFini(KdKeyboardInfo * ki)
 {
+    free(ki->driverPrivate);
     ephyrKbd = NULL;
     return;
 }
commit b2167015043a458e9cf93b827b43eb5b7c552ce9
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Sat Nov 4 23:06:27 2017 +0100

    xkb: initialize tsyms
    
    This fixes some “Conditional jump depends on uninitialized value(s)”
    errors spotted by valgrind.
    
    Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
    Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 25b5a364e..8975ade8d 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -222,7 +222,7 @@ XkbUpdateKeyTypesFromCore(DeviceIntPtr pXDev,
     XkbDescPtr xkb;
     unsigned key, nG, explicit;
     int types[XkbNumKbdGroups];
-    KeySym tsyms[XkbMaxSymsPerKey], *syms;
+    KeySym tsyms[XkbMaxSymsPerKey] = {NoSymbol}, *syms;
     XkbMapChangesPtr mc;
 
     xkb = pXDev->key->xkbInfo->desc;


More information about the xorg-commit mailing list