chiark / gitweb /
path: properly free PathSpec structs
[elogind.git] / src / job.c
index 8ab12cd62410eb3287e4a6c052915108b79fa604..79189f04da101db1ed8188ea95601c6e1c64f8cd 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -385,6 +385,9 @@ int job_run_and_invalidate(Job *j) {
 
                 case JOB_START:
                         r = unit_start(j->unit);
+
+                        /* If this unit cannot be started, then simply
+                         * wait */
                         if (r == -EBADR)
                                 r = 0;
                         break;
@@ -402,6 +405,11 @@ int job_run_and_invalidate(Job *j) {
 
                 case JOB_STOP:
                         r = unit_stop(j->unit);
+
+                        /* If this unit cannot stopped, then simply
+                         * wait. */
+                        if (r == -EBADR)
+                                r = 0;
                         break;
 
                 case JOB_RELOAD: