xserver: Branch 'master'

Peter Hutterer whot at kemper.freedesktop.org
Sun May 10 22:55:15 PDT 2009


 xkb/xkbInit.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ac13145dbcb284293582435409d8a90f276785c5
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon May 11 15:45:46 2009 +1000

    xkb: if kbd init failed, NULL out the pointers after freeing them (#21278)
    
    Reproducible:
    Configure a server that uses the keyboard driver with an invalid ruleset,
    e.g. (Option "XkbRules" "foobar"). Ensure that Option "AllowEmptyInput" is
    "off" in the ServerFlags or ServerLayout section. Start the server.
    After failing to init the keymap, the server will try to clean up after the
    device, double-freeing some xkb structs that have not been reset properly.
    
    X.Org Bug 21278 <http://bugs.freedesktop.org/show_bug.cgi?id=21278>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index bea8ce0..e707f7a 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -622,10 +622,13 @@ unwind_desc:
     XkbFreeKeyboard(xkb, 0, TRUE);
 unwind_info:
     xfree(xkbi);
+    dev->key->xkbInfo = NULL;
 unwind_kbdfeed:
     xfree(dev->kbdfeed);
+    dev->kbdfeed = NULL;
 unwind_key:
     xfree(dev->key);
+    dev->key = NULL;
     return FALSE;
 }
 


More information about the xorg-commit mailing list