summaryrefslogtreecommitdiff
path: root/src/shared/bus-unit-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-03-06 19:19:38 +0100
committerLennart Poettering <lennart@poettering.net>2019-03-13 17:38:43 +0100
commitdb7091dca2f3bf348b0c8cb7197a4da2461f7e19 (patch)
treef96bd769a7060b499eda48e53486865df7f9a6c7 /src/shared/bus-unit-util.c
parent2cdb2c2dc35f2e5833cd35446ab3509cfc2a2ecc (diff)
downloadsystemd-db7091dca2f3bf348b0c8cb7197a4da2461f7e19.tar.gz
bus-unit-util: insist on full initialization
Diffstat (limited to 'src/shared/bus-unit-util.c')
-rw-r--r--src/shared/bus-unit-util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
index e753eafd85..a25e82e017 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
@@ -1987,6 +1987,7 @@ finish:
static int check_wait_response(BusWaitForJobs *d, bool quiet, const char* const* extra_args) {
assert(d);
+ assert(d->name);
assert(d->result);
if (!quiet) {
@@ -2055,14 +2056,14 @@ int bus_wait_for_jobs(BusWaitForJobs *d, bool quiet, const char* const* extra_ar
if (q < 0)
return log_error_errno(q, "Failed to wait for response: %m");
- if (d->result) {
+ if (d->name && d->result) {
q = check_wait_response(d, quiet, extra_args);
/* Return the first error as it is most likely to be
* meaningful. */
if (q < 0 && r == 0)
r = q;
- log_debug_errno(q, "Got result %s/%m for job %s", strna(d->result), strna(d->name));
+ log_debug_errno(q, "Got result %s/%m for job %s", d->result, d->name);
}
d->name = mfree(d->name);