summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index b042f95..4fa3988 100644
--- a/src/config.c
+++ b/src/config.c
@@ -321,14 +321,17 @@ bool fastd_config_add_log_file(fastd_context_t *ctx, fastd_config_t *conf, const
if(chdir(oldcwd))
pr_error(ctx, "can't chdir to `%s': %s", oldcwd, strerror(errno));
+
+ free(logdir);
}
else {
pr_error(ctx, "change from directory `%s' to `%s' failed: %s", oldcwd, dir, strerror(errno));
}
-
+ free(oldcwd);
free(name2);
free(name3);
+
return true;
}