summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal/journald-server.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 3bee18b35b..80c9736420 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1552,8 +1552,16 @@ int server_init(Server *s) {
s->audit_fd = fd;
- } else
- log_error("Unknown socket passed as file descriptor %d, ignoring.", fd);
+ } else {
+ log_warning("Unknown socket passed as file descriptor %d, ignoring.", fd);
+
+ /* Let's close the fd, better be safe than
+ sorry. The fd might reference some resource
+ that we really want to release if we don't
+ make use of it. */
+
+ safe_close(fd);
+ }
}
r = server_open_syslog_socket(s);