From ca5e693524b4131e94b5f02f76a874507c02bf1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 12 Aug 2019 19:31:21 +0200 Subject: [PATCH] config: don't log a NULL path --- config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index d840489d..5e5a991d 100644 --- a/config.c +++ b/config.c @@ -455,8 +455,6 @@ config_load(struct config *conf) }; char *path = get_config_path(); - LOG_INFO("loading configuration from %s", path); - if (path == NULL) { /* Default conf */ LOG_WARN("no configuration found, using defaults"); @@ -464,6 +462,8 @@ config_load(struct config *conf) goto out; } + LOG_INFO("loading configuration from %s", path); + FILE *f = fopen(path, "r"); if (f == NULL) { LOG_ERR("%s: failed to open", path);