aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}