From: David Tardon Date: Thu, 26 Sep 2024 07:45:44 +0000 (+0200) Subject: logind-dbus: really cancel scheduled shutdown X-Git-Tag: v257-rc1~362 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd9c3327cbc936fc7e3a07d12b94328586ccfbaa;p=thirdparty%2Fsystemd.git logind-dbus: really cancel scheduled shutdown Fixes #34554 --- diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index b66573f0963..6dd375c1646 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -2379,9 +2379,9 @@ static usec_t nologin_timeout_usec(usec_t elapse) { static void reset_scheduled_shutdown(Manager *m) { assert(m); - m->scheduled_shutdown_timeout_source = sd_event_source_unref(m->scheduled_shutdown_timeout_source); - m->wall_message_timeout_source = sd_event_source_unref(m->wall_message_timeout_source); - m->nologin_timeout_source = sd_event_source_unref(m->nologin_timeout_source); + m->scheduled_shutdown_timeout_source = sd_event_source_disable_unref(m->scheduled_shutdown_timeout_source); + m->wall_message_timeout_source = sd_event_source_disable_unref(m->wall_message_timeout_source); + m->nologin_timeout_source = sd_event_source_disable_unref(m->nologin_timeout_source); m->scheduled_shutdown_action = _HANDLE_ACTION_INVALID; m->scheduled_shutdown_timeout = USEC_INFINITY;