diff options
| author | 2009-08-28 13:29:06 -0700 | |
|---|---|---|
| committer | 2009-08-28 13:30:03 -0700 | |
| commit | 07549f984d0088a5580caefeb5d40d0a39abcd0a (patch) | |
| tree | 3b30f6de4118e3658f8c505fe479b87479cc23d4 /libs/ui/EventHub.cpp | |
| parent | 89795d8fa6da8b2f42372ed6bcae0bc1420d19a3 (diff) | |
EventHub: Fix file descriptor leak.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'libs/ui/EventHub.cpp')
| -rw-r--r-- | libs/ui/EventHub.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp index df713cbc9c..60c177b7aa 100644 --- a/libs/ui/EventHub.cpp +++ b/libs/ui/EventHub.cpp @@ -784,6 +784,7 @@ int EventHub::close_device(const char *deviceName) 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); |