projects
/
platform
/
core
/
system
/
sensord.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e2aa78
)
Fix fd leak
35/263635/1
author
INSUN PYO
<insun.pyo@samsung.com>
Tue, 7 Sep 2021 07:49:46 +0000
(16:49 +0900)
committer
INSUN PYO
<insun.pyo@samsung.com>
Tue, 7 Sep 2021 07:49:53 +0000
(16:49 +0900)
Change-Id: I4d74acb337b0fd4aaac6fb911055ac702dd055b3
src/shared/event_loop.cpp
patch
|
blob
|
history
diff --git
a/src/shared/event_loop.cpp
b/src/shared/event_loop.cpp
index e0e979948140f92e9488bb2695cb6c80a5d11874..a60ba38f9c15046f3fc721b9d14375a8710d25d5 100644
(file)
--- a/
src/shared/event_loop.cpp
+++ b/
src/shared/event_loop.cpp
@@
-102,6
+102,9
@@
event_loop::event_loop(GMainLoop *mainloop)
event_loop::~event_loop()
{
+ if (m_term_fd != -1)
+ close(m_term_fd);
+
_D("Destoryed");
}
@@
-268,7
+271,7
@@
bool event_loop::run(int timeout)
g_source_unref(src);
}
- m_term_fd = eventfd(0,
0
);
+ m_term_fd = eventfd(0,
EFD_CLOEXEC
);
retv_if(m_term_fd == -1, false);
terminator *handler = new(std::nothrow) terminator(this);