aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/log.c b/src/log.c
index 140b50a2e..86dd86eaa 100644
--- a/src/log.c
+++ b/src/log.c
@@ -271,10 +271,18 @@ log_init(bool verbose, bool use_stdout, GError **error_r)
return true;
#endif
} else {
- const char *path = config_get_path(CONF_LOG_FILE);
- assert(path != NULL);
-
- return log_init_file(path, param->line, error_r);
+ GError *error = NULL;
+ char *path = config_dup_path(CONF_LOG_FILE, &error);
+ if (path == NULL) {
+ assert(error != NULL);
+ g_propagate_error(error_r, error);
+ return false;
+ }
+
+ bool success = log_init_file(path, param->line,
+ error_r);
+ g_free(path);
+ return success;
}
}
}