aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
Diffstat (limited to 'ares')
-rw-r--r--ares/ares_destroy.c3
-rw-r--r--ares/ares_expand_name.c1
-rw-r--r--ares/ares_free_hostent.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/ares/ares_destroy.c b/ares/ares_destroy.c
index e9b1bfd07..4e99a89f5 100644
--- a/ares/ares_destroy.c
+++ b/ares/ares_destroy.c
@@ -28,7 +28,8 @@ void ares_destroy(ares_channel channel)
for (i = 0; i < channel->ndomains; i++)
free(channel->domains[i]);
free(channel->domains);
- free(channel->sortlist);
+ if(channel->sortlist)
+ free(channel->sortlist);
free(channel->lookups);
while (channel->queries)
{
diff --git a/ares/ares_expand_name.c b/ares/ares_expand_name.c
index 3c028158b..b242abf0f 100644
--- a/ares/ares_expand_name.c
+++ b/ares/ares_expand_name.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include "ares.h"
+#include "ares_private.h" /* for the memdebug */
static int name_length(const unsigned char *encoded, const unsigned char *abuf,
int alen);
diff --git a/ares/ares_free_hostent.c b/ares/ares_free_hostent.c
index 52de303fa..177dd768b 100644
--- a/ares/ares_free_hostent.c
+++ b/ares/ares_free_hostent.c
@@ -22,6 +22,7 @@
#endif
#include "ares.h"
+#include "ares_private.h" /* for memdebug */
void ares_free_hostent(struct hostent *host)
{