diff --git a/src/login/logind-button.c b/src/login/logind-button.c index daffbf0668c..1624a31cc30 100644 --- a/src/login/logind-button.c +++ b/src/login/logind-button.c @@ -341,7 +341,8 @@ int button_open(Button *b) { } (void) button_set_mask(b); - + + b->io_event_source = sd_event_source_unref(b->io_event_source); r = sd_event_add_io(b->manager->event, &b->io_event_source, b->fd, EPOLLIN, button_dispatch, b); if (r < 0) { log_error_errno(r, "Failed to add button event: %m");