diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-04-25 13:36:01 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-04-25 13:36:01 +0200 |
commit | c7383edd721867a34313690831463c6ef280e14e (patch) | |
tree | b75fc7532f0a0a0e30ae9e3f69854bd8872ae672 | |
parent | f39efad8df5327babb6b6141a03ce06e49b4cbdf (diff) | |
download | fastd-c7383edd721867a34313690831463c6ef280e14e.tar fastd-c7383edd721867a34313690831463c6ef280e14e.zip |
Fix memory leak in config parser
-rw-r--r-- | src/config.c | 5 |
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; } |