[systemd-commits] src/journal
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Dec 17 11:02:39 PST 2013
src/journal/journald-kmsg.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit a69f4254a82765cd0c7f155d5dc86e0768ea0ef3
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Dec 17 20:02:21 2013 +0100
journald: before closing /dev/kmsg let's unregister the event source
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 5c7c06a..0c8446a 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -428,8 +428,13 @@ int server_open_dev_kmsg(Server *s) {
return 0;
fail:
- close_nointr_nofail(s->dev_kmsg_fd);
- s->dev_kmsg_fd = -1;
+ if (s->dev_kmsg_event_source)
+ s->dev_kmsg_event_source = sd_event_source_unref(s->dev_kmsg_event_source);
+
+ if (s->dev_kmsg_fd >= 0) {
+ close_nointr_nofail(s->dev_kmsg_fd);
+ s->dev_kmsg_fd = -1;
+ }
return r;
}
More information about the systemd-commits
mailing list