diff --git a/ares_init.c b/ares_init.c index 444fd8a6..41598e6e 100644 --- a/ares_init.c +++ b/ares_init.c @@ -109,7 +109,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, } if (channel->nsort != -1) free(channel->sortlist); - free(channel->lookups); + if(channel->lookups) + free(channel->lookups); free(channel); return status; }