]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
--conf-file should read no file, not try and read the default file.
authorSimon Kelley <simon@thekelleys.org.uk>
Sun, 5 Jul 2015 20:59:10 +0000 (21:59 +0100)
committerSimon Kelley <simon@thekelleys.org.uk>
Sun, 5 Jul 2015 20:59:10 +0000 (21:59 +0100)
CHANGELOG
src/option.c

index 7d8f73ffa61cab987d810a2a85bd952c9c202b19..76abc142aa1595f94ce9898246813eb7f982c0f0 100644 (file)
--- 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 
index f99c3f59e9d37ba9eb7584df3ca5379bc62c173e..ecc26190bd297a62dcfa580baf47051241fa2f63 100644 (file)
@@ -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 */