Skip to content

Commit

Permalink
Merge pull request #4814 from haesbaert/dns-cleanup
Browse files Browse the repository at this point in the history
Cleanup allocated dns runtime data
  • Loading branch information
Kelimion authored Feb 9, 2025
2 parents fdc0115 + cd53949 commit 963663b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/net/dns.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 963663b

Please # to comment.