Fix resolver after /rehash with no "dns server" directives.
[ircu2.10.12-pk.git] / ircd / s_conf.c
index 2cc9385e2c8751c67f1ae2c2bed85ab15d456b13..1dc438b14591253982b44c46370664ae07fc4c83 100644 (file)
@@ -221,7 +221,6 @@ void conf_parse_userhost(struct ConfItem *aconf, char *host)
     aconf->addrbits = addrbits;
   else
     aconf->addrbits = -1;
-  MyFree(host);
 }
 
 /** Copies a completed DNS query into its ConfItem.
@@ -946,9 +945,6 @@ int rehash(struct Client *cptr, int sig)
 
   clear_quarantines();
 
-  if (sig != 2)
-    restart_resolver();
-
   class_mark_delete();
   mark_listeners_closing();
   auth_mark_closing();
@@ -956,6 +952,9 @@ int rehash(struct Client *cptr, int sig)
 
   read_configuration_file();
 
+  if (sig != 2)
+    restart_resolver();
+
   log_reopen(); /* reopen log files */
 
   auth_close_unused();