chiark / gitweb /
logind: add support for /run/nologin and /run/systemd/shutdown/scheduled
[elogind.git] / src / login / logind.c
index d8163ecf919296e4c35def14c5f9f8d5262b7bfe..7520f1345b7ccd3a4d81f3ea1fb6ee98daf32fa9 100644 (file)
@@ -144,6 +144,9 @@ static void manager_free(Manager *m) {
 
         sd_event_source_unref(m->idle_action_event_source);
         sd_event_source_unref(m->inhibit_timeout_source);
+        sd_event_source_unref(m->scheduled_shutdown_timeout_source);
+        sd_event_source_unref(m->nologin_timeout_source);
+        sd_event_source_unref(m->wall_message_timeout_source);
 
         sd_event_source_unref(m->console_active_event_source);
         sd_event_source_unref(m->udev_seat_event_source);
@@ -166,6 +169,9 @@ static void manager_free(Manager *m) {
         if (m->udev)
                 udev_unref(m->udev);
 
+        if (m->unlink_nologin)
+                unlink("/run/nologin");
+
         bus_verify_polkit_async_registry_free(m->polkit_registry);
 
         sd_bus_unref(m->bus);
@@ -176,6 +182,9 @@ static void manager_free(Manager *m) {
         strv_free(m->kill_only_users);
         strv_free(m->kill_exclude_users);
 
+        free(m->scheduled_shutdown_type);
+        free(m->scheduled_shutdown_tty);
+        free(m->wall_message);
         free(m->action_job);
         free(m);
 }