summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-23 21:01:32 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-23 21:01:32 +0100
commitbe04cbca6c2c03e9f62e8981cb9b5626c118c953 (patch)
tree0ad4d3479b6b0bdde4af1b9c0155b11285425b31 /src/core
parent9a8112f5e9f1d80bf1740fe507185f992ab3c34c (diff)
core: when we close the notify fd, we also need to free its event source
Diffstat (limited to 'src/core')
-rw-r--r--src/core/manager.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index d8d5667dc2..c26dcaa999 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2208,8 +2208,10 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
if (safe_atoi(l + 10, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
log_debug("Failed to parse notify fd: %s", l + 10);
else {
- if (m->notify_fd >= 0)
+ if (m->notify_fd >= 0) {
+ m->notify_event_source = sd_event_source_unref(m->notify_event_source);
close_nointr_nofail(m->notify_fd);
+ }
m->notify_fd = fdset_remove(fds, fd);
}