diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-03-06 19:19:38 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-03-13 17:38:43 +0100 |
commit | db7091dca2f3bf348b0c8cb7197a4da2461f7e19 (patch) | |
tree | f96bd769a7060b499eda48e53486865df7f9a6c7 /src/shared/bus-unit-util.c | |
parent | 2cdb2c2dc35f2e5833cd35446ab3509cfc2a2ecc (diff) | |
download | systemd-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.c | 5 |
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); |