From 5022ce717016e7d3e659357812fc04b95bbf17d7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 12 Nov 2015 20:14:33 +0100 Subject: [PATCH] core: make sure to reset the bus error struct before reusing it Otherwise the call might fail, because the error structure is already initialized. --- src/core/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/main.c b/src/core/main.c index dcd63feb828..33529c3e768 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));