aboutsummaryrefslogtreecommitdiff
path: root/src/dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns.c')
-rw-r--r--src/dns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dns.c b/src/dns.c
index 7f5711d8..980586c6 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -487,10 +487,13 @@ static void Dns_timeout_client(void *data)
*/
void a_Dns_freeall(void)
{
- int i;
+ int i, j;
for ( i = 0; i < dns_cache_size; ++i ){
dFree(dns_cache[i].hostname);
+ for ( j = 0; j < dList_length(dns_cache[i].addr_list); ++j)
+ dFree(dList_nth_data(dns_cache[i].addr_list, j));
+ dList_free(dns_cache[i].addr_list);
}
dFree(dns_cache);
}