initctl: shorten and update code a bit

This commit is contained in:
Lennart Poettering 2019-01-17 15:54:37 +01:00
parent 92e31da100
commit aae82d1a36
1 changed files with 2 additions and 6 deletions

View File

@ -233,12 +233,8 @@ static void server_done(Server *s) {
while (s->fifos)
fifo_free(s->fifos);
safe_close(s->epoll_fd);
if (s->bus) {
sd_bus_flush(s->bus);
sd_bus_unref(s->bus);
}
s->epoll_fd = safe_close(s->epoll_fd);
s->bus = sd_bus_flush_close_unref(s->bus);
}
static int server_init(Server *s, unsigned n_sockets) {