From e9a6f6d1a0b5cf6f7dc4fb122f6d28cbf3929960 Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Hull" Date: Fri, 31 Mar 2006 18:11:52 +0000 Subject: Fix the fd pointer leak reported by primer. (Not the same patch.) Disable the undocumented xkb guts options in the key driver. (Requested by Daniel Stone.) --- ChangeLog | 10 +++++++++- src/evdev_brain.c | 6 +----- src/evdev_key.c | 2 ++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index aec9f5a..ab9c7bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ -2006-03-16 Zephaniah E. Hull,,, +2006-03-31 Zephaniah E. Hull + + * src/evdev_brain.c: (FillDevInfo), (evdevRescanDevices): + Fix the fd pointer leak reported by primer. (Not the same patch.) + * src/evdev_key.c: (EvdevKeyNew): + Disable the undocumented xkb guts options in the key driver. + (Requested by Daniel Stone.) + +2006-03-16 Zephaniah E. Hull * src/evdev_brain.c: (MatchDriver): Switch from my own globbing function to fnmatch. diff --git a/src/evdev_brain.c b/src/evdev_brain.c index e3163c3..2de39c6 100644 --- a/src/evdev_brain.c +++ b/src/evdev_brain.c @@ -74,7 +74,6 @@ evdevGetFDForDevice (evdevDevicePtr device) } while (0) typedef struct { - int fd; evdevBitsRec bits; char name[256]; char phys[256]; @@ -260,7 +259,7 @@ FillDevInfo (char *dev, evdevDevInfoPtr info) } strncpy (info->dev, dev, sizeof(info->dev)); - info->fd = fd; + close (fd); return TRUE; } @@ -291,9 +290,6 @@ evdevRescanDevices (InputInfoPtr pInfo) break; } } - - if (!found) - close (info.fd); } for (driver = evdev_drivers; driver; driver = driver->next) diff --git a/src/evdev_key.c b/src/evdev_key.c index 1073d62..c98d336 100644 --- a/src/evdev_key.c +++ b/src/evdev_key.c @@ -387,11 +387,13 @@ EvdevKeyNew (InputInfoPtr pInfo) SetXkbOption (pInfo, "XkbVariant", NULL, &state->key->xkb_variant); SetXkbOption (pInfo, "XkbOptions", NULL, &state->key->xkb_options); + /* SetXkbOption (pInfo, "XkbKeycodes", NULL, &state->key->xkbnames.keycodes); SetXkbOption (pInfo, "XkbTypes", NULL, &state->key->xkbnames.types); SetXkbOption (pInfo, "XkbCompat", NULL, &state->key->xkbnames.compat); SetXkbOption (pInfo, "XkbSymbols", NULL, &state->key->xkbnames.symbols); SetXkbOption (pInfo, "XkbGeometry", NULL, &state->key->xkbnames.geometry); + */ return Success; } -- cgit v1.2.3