diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-07-25 16:51:21 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-07-25 16:59:11 -0500 |
commit | 69c6cbfdf19c032f32cbf7d39e2136856ceea5b1 (patch) | |
tree | 8d3c88adbcc32ddf0af2dc759a86dbed05ba895c | |
parent | a5fc50c186b38aa3e0e8d37586201000a51eebfa (diff) | |
download | efl-69c6cbfdf19c032f32cbf7d39e2136856ceea5b1.tar.gz |
elput: Close fds when asked to
Our close callback tells logind we're done with a device, but it should
also actually close the fd it's passed, or we end up leaking piles of
fds on VC switch.
see weston commit 8f5acc2f3a29c3831af4ddd6bed57f703c98dc77
and subsequent regression in commit 72dea06d7952e3ce8dd8057f7106186da4fa2678
and pending fix in https://patchwork.freedesktop.org/patch/168992/
-rw-r--r-- | src/lib/elput/elput_logind.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c index 91eaffcbda..842de225e8 100644 --- a/src/lib/elput/elput_logind.c +++ b/src/lib/elput/elput_logind.c @@ -649,6 +649,7 @@ _logind_close(Elput_Manager *em, int fd) int ret; ret = fstat(fd, &st); + close(fd); if (ret < 0) return; if (!S_ISCHR(st.st_mode)) return; |