aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-05-27 07:10:02 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-05-27 07:10:02 +0000
commita5360255bad2429ca9be414a212fbaadb3b8987e (patch)
tree37a7e88b114cef1ff85df0fcf11cbccd90663a32 /ares
parent5690a2b493d2df6de999c451dd2dafb6b89f71e7 (diff)
clear the domains and sortlist when the 'channel' is first created so that
we can compare if non-NULL elsewhere
Diffstat (limited to 'ares')
-rw-r--r--ares/ares_init.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ares/ares_init.c b/ares/ares_init.c
index 19c3eb26b..c0c621bd7 100644
--- a/ares/ares_init.c
+++ b/ares/ares_init.c
@@ -85,6 +85,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
channel->nsort = -1;
channel->lookups = NULL;
channel->queries = NULL;
+ channel->domains = NULL;
+ channel->sortlist = NULL;
/* Initialize configuration by each of the four sources, from highest
* precedence to lowest.
@@ -464,8 +466,10 @@ DhcpNameServer
/* Handle errors. */
if (status != ARES_EOF)
{
- if (servers != NULL) free(servers);
- if (sortlist != NULL) free(sortlist);
+ if (servers != NULL)
+ free(servers);
+ if (sortlist != NULL)
+ free(sortlist);
return status;
}