Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07549f98 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

EventHub: Fix file descriptor leak.

parent 89795d8f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);