core: make sure to reset the bus error struct before reusing it

Otherwise the call might fail, because the error structure is already
initialized.
This commit is contained in:
Lennart Poettering 2015-11-12 20:14:33 +01:00
parent 53f1841669
commit 5022ce7170
1 changed files with 2 additions and 0 deletions

View File

@ -1748,6 +1748,8 @@ int main(int argc, char *argv[]) {
if (r == -EPERM) {
log_debug("Default target could not be isolated, starting instead: %s", bus_error_message(&error, r));
sd_bus_error_free(&error);
r = manager_add_job(m, JOB_START, target, JOB_REPLACE, &error, &default_unit_job);
if (r < 0) {
log_emergency("Failed to start default target: %s", bus_error_message(&error, r));