diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-02-09 02:12:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-09 02:12:02 +0100 |
| commit | 963663b8e1dd84b4ed82e6db2aca8052f6c861e0 (patch) | |
| tree | efa526e9c829d31de0ac9a3d9748b761c900d173 /core/net/dns.odin | |
| parent | fdc011555f70daadf899703bd6ccba3b403627c9 (diff) | |
| parent | cd53949c928dc3d848658661c58b7705b3904681 (diff) | |
Merge pull request #4814 from haesbaert/dns-cleanup
Cleanup allocated dns runtime data
Diffstat (limited to 'core/net/dns.odin')
| -rw-r--r-- | core/net/dns.odin | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/net/dns.odin b/core/net/dns.odin index 3730b8e94..9febc8b34 100644 --- a/core/net/dns.odin +++ b/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 |