projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38c569b
)
job: fix coverity issue
author
Lennart Poettering
<lennart@poettering.net>
Wed, 31 Jul 2019 07:44:28 +0000
(09:44 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 31 Jul 2019 07:45:03 +0000
(09:45 +0200)
Fixes coverity issue 1403550
src/core/job.c
patch
|
blob
|
history
diff --git
a/src/core/job.c
b/src/core/job.c
index
cda4f34
..
9537366
100644
(file)
--- a/
src/core/job.c
+++ b/
src/core/job.c
@@
-1153,8
+1153,11
@@
void job_add_to_run_queue(Job *j) {
log_warning_errno(r, "Failed to enable job run queue event source, ignoring: %m");
}
- prioq_put(j->manager->run_queue, j, &j->run_queue_idx);
- j->in_run_queue = true;
+ r = prioq_put(j->manager->run_queue, j, &j->run_queue_idx);
+ if (r < 0)
+ log_warning_errno(r, "Failed put job in run queue, ignoring: %m");
+ else
+ j->in_run_queue = true;
}
void job_add_to_dbus_queue(Job *j) {