diff --git a/src/lib/ares_init.c b/src/lib/ares_init.c index bae7c72f..78a81b01 100644 --- a/src/lib/ares_init.c +++ b/src/lib/ares_init.c @@ -261,31 +261,6 @@ static ares_status_t init_by_defaults(ares_channel_t *channel) } error: - if (rc) { - if (channel->domains && channel->domains[0]) { - ares_free(channel->domains[0]); - } - if (channel->domains) { - ares_free(channel->domains); - channel->domains = NULL; - } - - if (channel->lookups) { - ares_free(channel->lookups); - channel->lookups = NULL; - } - - if (channel->resolvconf_path) { - ares_free(channel->resolvconf_path); - channel->resolvconf_path = NULL; - } - - if (channel->hosts_path) { - ares_free(channel->hosts_path); - channel->hosts_path = NULL; - } - } - if (hostname) { ares_free(hostname); }