diff options
author | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 06:04:14 +0000 |
---|---|---|
committer | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 06:04:14 +0000 |
commit | 85cd2fd5d211eb560b0dd20c94929173b46f82eb (patch) | |
tree | ff6418f4a6580d6166bf540b0d63479cf0435593 /device/hid/hid_service_linux.cc | |
parent | 43f57972bb875555073b545279284e6d7152d22f (diff) | |
download | chromium_src-85cd2fd5d211eb560b0dd20c94929173b46f82eb.zip chromium_src-85cd2fd5d211eb560b0dd20c94929173b46f82eb.tar.gz chromium_src-85cd2fd5d211eb560b0dd20c94929173b46f82eb.tar.bz2 |
Fix HID device removal handling on Linux.
The removal handler was being short-circuited by unnecessary code,
causing removed devices to be tracked permanently and causing
chrome.hid.getDevices to leak old device IDs.
BUG=347758
TBR=rpaquay@chromium.org
Review URL: https://codereview.chromium.org/183963003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/hid/hid_service_linux.cc')
-rw-r--r-- | device/hid/hid_service_linux.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/device/hid/hid_service_linux.cc b/device/hid/hid_service_linux.cc index 0c8d7c9..04a3c16 100644 --- a/device/hid/hid_service_linux.cc +++ b/device/hid/hid_service_linux.cc @@ -187,18 +187,10 @@ void HidServiceLinux::PlatformAddDevice(udev_device* device) { } void HidServiceLinux::PlatformRemoveDevice(udev_device* raw_dev) { - // The returned the device is not referenced. - udev_device* hid_dev = - udev_device_get_parent_with_subsystem_devtype(raw_dev, "hid", NULL); - - if (!hid_dev) - return; - const char* device_path = NULL; - device_path = udev_device_get_syspath(hid_dev); + device_path = udev_device_get_syspath(raw_dev); if (device_path == NULL) return; - RemoveDevice(device_path); } |