aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ares/ares_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ares/ares_init.c b/ares/ares_init.c
index 444fd8a66..41598e6ed 100644
--- a/ares/ares_init.c
+++ b/ares/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;
}