aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-10-16 23:15:07 +0300
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-10-16 23:15:07 +0300
commit7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0 (patch)
tree1ed976865a25b2b2ce46a5b05fc5652b03af8abb
parent5b8b4fdbfc6f88e874bc62269b9188caf886120f (diff)
downloadck-7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0.tar.gz
ck-7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0.tar.bz2
ck-7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0.zip
macro in free_conf
-rw-r--r--src/confparser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/confparser.c b/src/confparser.c
index 64bfe34..2a11467 100644
--- a/src/confparser.c
+++ b/src/confparser.c
@@ -135,12 +135,12 @@ int config_file_parse(Conf *conf, UserOpt *opt) {
}
void free_conf(Conf *conf) {
- if (conf->vc_dir) {
- free(conf->vc_dir);
- }
- if (conf->scrt_dir) {
- free(conf->scrt_dir);
+#define X(var,str,name) \
+ if (conf->var) { \
+ free(conf->var); \
}
+ CONFIG_VARIABLES_TABLE
+#undef X
}
int init_create_config_file(UserOpt *opt) {