1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 02:57:16 +03:00

manager: remove ask-password fd from sd_event before closing it

Otherwise we might attempt to remove a non-existing fd from epoll.
This commit is contained in:
Lennart Poettering 2015-08-30 22:13:55 +02:00
parent 6d3eefd28e
commit 90990e28c9

View File

@ -250,8 +250,8 @@ static int manager_dispatch_ask_password_fd(sd_event_source *source,
static void manager_close_ask_password(Manager *m) { static void manager_close_ask_password(Manager *m) {
assert(m); assert(m);
m->ask_password_inotify_fd = safe_close(m->ask_password_inotify_fd);
m->ask_password_event_source = sd_event_source_unref(m->ask_password_event_source); m->ask_password_event_source = sd_event_source_unref(m->ask_password_event_source);
m->ask_password_inotify_fd = safe_close(m->ask_password_inotify_fd);
m->have_ask_password = -EINVAL; m->have_ask_password = -EINVAL;
} }