projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0f71f4
)
journald: before closing /dev/kmsg let's unregister the event source
author
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Dec 2013 19:02:21 +0000
(20:02 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Dec 2013 19:02:21 +0000
(20:02 +0100)
src/journal/journald-kmsg.c
patch
|
blob
|
history
diff --git
a/src/journal/journald-kmsg.c
b/src/journal/journald-kmsg.c
index
5c7c06a
..
0c8446a
100644
(file)
--- 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;
}