diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-02-24 03:23:43 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-02-24 03:23:43 +0100 |
commit | a6a9a78d95e9ba302b259f6871433f510c606308 (patch) | |
tree | 5c5cc70d266e8163a2ea23258693d7e1ffb067e1 /src/job.c | |
parent | c77bc38d28b2da11dcd219635205e633b5c0cd28 (diff) |
job: don't access j->type when j is already freed
Diffstat (limited to 'src/job.c')
-rw-r--r-- | src/job.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -502,11 +502,11 @@ int job_finish_and_invalidate(Job *j, JobResult result) { t = j->type; job_free(j); - if (result == JOB_FAILED && j->type == JOB_START) + if (result == JOB_FAILED && t == JOB_START) unit_status_printf(u, "Starting %s " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ", see 'systemctl status %s' for details.\n", unit_description(u), u->meta.id); - else if (result == JOB_TIMEOUT && j->type == JOB_START) + else if (result == JOB_TIMEOUT && t == JOB_START) unit_status_printf(u, "Starting %s " ANSI_HIGHLIGHT_ON "timed out" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u), u->meta.id); - else if (result == JOB_TIMEOUT && j->type == JOB_STOP) + else if (result == JOB_TIMEOUT && t == JOB_STOP) unit_status_printf(u, "Stopping %s " ANSI_HIGHLIGHT_ON "timed out" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u), u->meta.id); /* Fail depending jobs on failure */ |