summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-04-25 23:33:58 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-04-25 23:33:58 +0200
commitee16a5d090bf8c1fab2a33d6623246e5a94bbc4a (patch)
tree0cfd87e89b575388fe54046ceaf39bc180bbaada /src
parentf572c729a005a3620c185746a9f6775dedbacba5 (diff)
complete a_Dns_freeall()
This is an attempt to make valgrind a little bit happier.
Diffstat (limited to 'src')
-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);
}