On Mon, 2009-04-06 at 14:11 +0200, David Jander wrote:
> 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);

Applied (with the KdSaveString changed to strdup), thanks!

- ajax

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to