lmkd: Close cgroup.event_control file when done writing
(cherry pick from commit 1bd2fc4fb6310da4303c3a76a259ab7e67bf39b8)
After events are specified by writing into cgroup.event_control file
the file should be closed.
Change-Id: Id015e6a7bac2b74bbc8d8793c85f529ee00bdf55
Merged-In: Id015e6a7bac2b74bbc8d8793c85f529ee00bdf55
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
diff --git a/lmkd/lmkd.c b/lmkd/lmkd.c
index d58c8f5..a9dc39c 100644
--- a/lmkd/lmkd.c
+++ b/lmkd/lmkd.c
@@ -860,6 +860,7 @@
}
maxevents++;
mpevfd[level] = evfd;
+ close(evctlfd);
return true;
err: