xserver: Branch 'server-1.4-branch' - 3 commits

Daniel Stone daniels at kemper.freedesktop.org
Wed Jan 16 23:43:11 PST 2008


 hw/kdrive/ephyr/ephyr.c |    1 +
 os/io.c                 |    2 +-
 xkb/xkbUtils.c          |    1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 636aa9e7be2822a0148067a11499ad48fe682cd9
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Jan 5 10:47:39 2008 +0200

    Xephyr: One-time keyboard leak fix
    
    Don't leak the originally-allocated keysym map.
    (cherry picked from commit e85130c85f727466fc27be1cfa46c88b257499fb)

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 27165a5..86e8f1f 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -915,6 +915,7 @@ EphyrKeyboardInit (KdKeyboardInfo *ki)
   ki->minScanCode = ki->keySyms.minKeyCode;
   ki->maxScanCode = ki->keySyms.maxKeyCode;
   ki->keySyms.mapWidth = ephyrKeySyms.mapWidth;
+  xfree(ki->keySyms.map);
   ki->keySyms.map = ephyrKeySyms.map;
   ki->name = KdSaveString("Xephyr virtual keyboard");
   ephyrKbd = ki;
commit 8a3acd3ec41b887b4aeaa0b2932265522c1e2836
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Jan 5 10:43:53 2008 +0200

    XKB: XkbCopyKeymap: Don't leak all the sections
    
    Previously, we'd just keep num_sections at 0, which would break the
    geometry and lead us to leak sections.  Don't do that.
    (cherry picked from commit 0137b0394a248f694448a7d97c9a1a3efcf24e81)

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index c7f9a26..e90df0d 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1770,6 +1770,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
             if (!tmp)
                 return FALSE;
             dst->geom->sections = tmp;
+            dst->geom->num_sections = src->geom->num_sections;
 
             for (i = 0,
                   ssection = src->geom->sections,
commit 02e805f0ff4b6af551372ba5fc5fb369c8834d1d
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Jan 5 10:38:16 2008 +0200

    OS: IO: Zero out client buffers
    
    For alignment reasons, we can write out uninitialised bytes, so allocate
    the whole thing with xcalloc.
    (cherry picked from commit b99a43dfe97c1813e1c61f298b1c83c5d5ca88a2)

diff --git a/os/io.c b/os/io.c
index 9de75ee..a8b84fb 100644
--- a/os/io.c
+++ b/os/io.c
@@ -1197,7 +1197,7 @@ AllocateOutputBuffer(void)
     oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput));
     if (!oco)
 	return (ConnectionOutputPtr)NULL;
-    oco->buf = (unsigned char *) xalloc(BUFSIZE);
+    oco->buf = (unsigned char *) xcalloc(1, BUFSIZE);
     if (!oco->buf)
     {
 	xfree(oco);


More information about the xorg-commit mailing list