#include "ares_private.h"
Include dependency graph for ares_destroy.c:
Go to the source code of this file.
Functions | |
void | ares_destroy (ares_channel channel) |
|
Definition at line 25 of file ares_destroy.c. References ares__close_sockets(), ares_channel, ARES_EDESTRUCTION, query::callback, ares_channeldata::domains, free, ares_channeldata::lookups, ares_channeldata::ndomains, query::next, ares_channeldata::nservers, NULL, ares_channeldata::queries, ares_channeldata::servers, and ares_channeldata::sortlist. Referenced by dns_client(), and gethostbynameaddr().
00026 { 00027 int i; 00028 struct query *query; 00029 00030 for (i = 0; i < channel->nservers; i++) 00031 ares__close_sockets(&channel->servers[i]); 00032 free(channel->servers); 00033 for (i = 0; i < channel->ndomains; i++) 00034 free(channel->domains[i]); 00035 free(channel->domains); 00036 free(channel->sortlist); 00037 free(channel->lookups); 00038 while (channel->queries) 00039 { 00040 query = channel->queries; 00041 channel->queries = query->next; 00042 query->callback(query->arg, ARES_EDESTRUCTION, NULL, 0); 00043 free(query->tcpbuf); 00044 free(query->skip_server); 00045 free(query); 00046 } 00047 free(channel); 00048 } |
Here is the call graph for this function: