From: Simon Kelley Date: Sun, 5 Jul 2015 20:59:10 +0000 (+0100) Subject: --conf-file should read no file, not try and read the default file. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90cb2225515faae2ca53bb6ff76a348fc6f1c403;p=people%2Fms%2Fdnsmasq.git --conf-file should read no file, not try and read the default file. --- diff --git a/CHANGELOG b/CHANGELOG index 7d8f73f..76abc14 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +version 2.74 + Fix reversion in 2.73 where --conf-file would attempt to + read the default file, rather than no file. + + version 2.73 Fix crash at startup when an empty suffix is supplied to --conf-dir, also trivial memory leak. Thanks to diff --git a/src/option.c b/src/option.c index f99c3f5..ecc2619 100644 --- a/src/option.c +++ b/src/option.c @@ -4371,7 +4371,7 @@ void read_opts(int argc, char **argv, char *compile_opts) { char *buff = opt_malloc(MAXDNAME); int option, conffile_opt = '7', testmode = 0; - char *arg, *conffile = NULL; + char *arg, *conffile = CONFFILE; opterr = 0; @@ -4488,11 +4488,8 @@ void read_opts(int argc, char **argv, char *compile_opts) if (conffile) { one_file(conffile, conffile_opt); - free(conffile); - } - else - { - one_file(CONFFILE, conffile_opt); + if (conffile_opt == 0) + free(conffile); } /* port might not be known when the address is parsed - fill in here */