2
0
Эх сурвалжийг харах

Merge pull request #4814 from haesbaert/dns-cleanup

Cleanup allocated dns runtime data
Jeroen van Rijn 7 сар өмнө
parent
commit
963663b8e1
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      core/net/dns.odin

+ 3 - 0
core/net/dns.odin

@@ -50,9 +50,12 @@ init_dns_configuration :: proc() {
 	dns_configuration.hosts_file,  _ = replace_environment_path(dns_configuration.hosts_file)
 }
 
+@(fini, private)
 destroy_dns_configuration :: proc() {
 	delete(dns_configuration.resolv_conf)
+	dns_configuration.resolv_conf = ""
 	delete(dns_configuration.hosts_file)
+	dns_configuration.hosts_file = ""
 }
 
 dns_configuration := DEFAULT_DNS_CONFIGURATION