chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c77bc38
)
job: don't access j->type when j is already freed
author
Lennart Poettering
<lennart@poettering.net>
Thu, 24 Feb 2011 02:23:43 +0000
(
03:23
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 24 Feb 2011 02:23:43 +0000
(
03:23
+0100)
src/job.c
patch
|
blob
|
history
diff --git
a/src/job.c
b/src/job.c
index 7470204710b2c3e282527a10b3a75a18145888b1..54c204b650335ec9d35be6ff5db50d1e286c2c7b 100644
(file)
--- a/
src/job.c
+++ b/
src/job.c
@@
-502,11
+502,11
@@
int job_finish_and_invalidate(Job *j, JobResult result) {
t = j->type;
job_free(j);
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);
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);
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 */
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 */