When xserver is started with the option '-mouse tslib' the tslib-driver opens 
the default device "/dev/input/touchscreen0", but the device path-name points 
to a constant string which is later freed with xfree ---> Segfault!

Signed-off-by: David Jander <[email protected]>
---
diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c
index 7ad7a88..3c76473 100644
--- a/hw/kdrive/linux/tslib.c
+++ b/hw/kdrive/linux/tslib.c
@@ -114,7 +114,7 @@ TslibEnable (KdPointerInfo *pi)
     private->raw_event_hook = NULL;
     private->raw_event_closure = NULL;
     if (!pi->path) {
-        pi->path = "/dev/input/touchscreen0";
+        pi->path = KdSaveString("/dev/input/touchscreen0");
         ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", 
pi->path);
     }
     private->tsDev = ts_open(pi->path, 0);
_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to