chiark / gitweb /
systemctl: always null-terminate the password
[elogind.git] / src / manager.c
index 6759bbac975c3e22ed8fe1b46b40a1976c5d9dcf..d77dc096172fa9fdf757a5fc0601ffa9c7280f23 100644 (file)
@@ -1216,6 +1216,7 @@ static int transaction_apply(Manager *m) {
 
                 job_add_to_run_queue(j);
                 job_add_to_dbus_queue(j);
+                job_start_timer(j);
 
                 log_debug("Installed new job %s/%s as %u", j->unit->meta.id, job_type_to_string(j->type), (unsigned) j->id);
         }
@@ -1822,7 +1823,7 @@ void manager_clear_jobs(Manager *m) {
         transaction_abort(m);
 
         while ((j = hashmap_first(m->jobs)))
-                job_free(j);
+                job_finish_and_invalidate(j, JOB_CANCELED);
 }
 
 unsigned manager_dispatch_run_queue(Manager *m) {