When a input device is plugged in, _cb_open_restricted() is called before creating evdev.
So setting fd value on evdev was failed in _cb_open_restricted() and also closing evdev->fd was invalid.
Using a eina_hash which has 'path-fd' pairs, we can find fd value after evdev is created.
Details
Details
(1) Multiple input devices are connected. Their evdev->fd remains zero or initial value.
(2) When one of those devices are plugged out, fd leak would happen.
Diff Detail
Diff Detail
- Repository
- rEFL core/efl
- Branch
- work
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 792 Build 857: arc lint + arc unit
src/lib/ecore_drm/ecore_drm_inputs.c | ||
---|---|---|
23 | I think this should be using intptr_t when adding to the hash because when we search the hash and assign it to edev, we are assigning it as intptr_t |