From c7383edd721867a34313690831463c6ef280e14e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 25 Apr 2013 13:36:01 +0200 Subject: Fix memory leak in config parser --- src/config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3