commit | 07549f984d0088a5580caefeb5d40d0a39abcd0a | [log] [tgz] |
---|---|---|
author | Mike Lockwood <lockwood@android.com> | Fri Aug 28 13:29:06 2009 -0700 |
committer | Mike Lockwood <lockwood@android.com> | Fri Aug 28 13:30:03 2009 -0700 |
tree | 3b30f6de4118e3658f8c505fe479b87479cc23d4 | |
parent | 89795d8fa6da8b2f42372ed6bcae0bc1420d19a3 [diff] [blame] |
EventHub: Fix file descriptor leak. Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp index df713cb..60c177b 100644 --- a/libs/ui/EventHub.cpp +++ b/libs/ui/EventHub.cpp
@@ -784,6 +784,7 @@ int count = mFDCount - i - 1; int index = (device->id&ID_MASK); mDevicesById[index].device = NULL; + close(mFDs[i].fd); memmove(mDevices + i, mDevices + i + 1, sizeof(mDevices[0]) * count); memmove(mFDs + i, mFDs + i + 1, sizeof(mFDs[0]) * count);