diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-12 20:14:33 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-12 20:14:33 +0100 |
commit | 5022ce717016e7d3e659357812fc04b95bbf17d7 (patch) | |
tree | 887704d8dbadf51518895cfdc02b6ffe6cc1a182 /src | |
parent | 53f18416690939479ff9bd4d4339107791061fd9 (diff) |
core: make sure to reset the bus error struct before reusing it
Otherwise the call might fail, because the error structure is already
initialized.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c index dcd63feb82..33529c3e76 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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)); |