xserver: Branch 'master' - 3 commits
Daniel Stone
daniels at kemper.freedesktop.org
Wed Jan 16 23:43:10 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 e85130c85f727466fc27be1cfa46c88b257499fb
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.
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index c5c8a56..6ec95d6 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -1031,6 +1031,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 0137b0394a248f694448a7d97c9a1a3efcf24e81
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.
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 31c1a9f..1fb47ed 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1793,6 +1793,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 b99a43dfe97c1813e1c61f298b1c83c5d5ca88a2
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.
diff --git a/os/io.c b/os/io.c
index 968f40a..be89021 100644
--- a/os/io.c
+++ b/os/io.c
@@ -1196,7 +1196,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