aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2006-07-22 15:12:34 +0000
committerGisle Vanem <gvanem@broadpark.no>2006-07-22 15:12:34 +0000
commit2f70fb70150f4416ccb4b2e2ca09b33a83c95cba (patch)
tree6b57e367b5bf6681963a2b1f946aa7ea166eef10
parent655ec6bf8e440725bd1cc931d4ef4ab66601704d (diff)
Use ares_free_string() to avoid detecting leaks.
-rw-r--r--ares/adig.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/ares/adig.c b/ares/adig.c
index b5ee38f2c..80ee7f47f 100644
--- a/ares/adig.c
+++ b/ares/adig.c
@@ -396,7 +396,7 @@ static const unsigned char *display_question(const unsigned char *aptr,
*/
if (aptr + QFIXEDSZ > abuf + alen)
{
- free(name);
+ ares_free_string(name);
return NULL;
}
@@ -412,7 +412,7 @@ static const unsigned char *display_question(const unsigned char *aptr,
if (dnsclass != C_IN)
printf("\t%s", class_name(dnsclass));
printf("\t%s\n", type_name(type));
- free(name);
+ ares_free_string(name);
return aptr;
}
@@ -436,7 +436,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
*/
if (aptr + RRFIXEDSZ > abuf + alen)
{
- free(name);
+ ares_free_string(name);
return NULL;
}
@@ -449,7 +449,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
aptr += RRFIXEDSZ;
if (aptr + dlen > abuf + alen)
{
- free(name);
+ ares_free_string(name);
return NULL;
}
@@ -458,7 +458,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
if (dnsclass != C_IN)
printf("\t%s", class_name(dnsclass));
printf("\t%s", type_name(type));
- free(name);
+ ares_free_string(name);
/* Display the RR data. Don't touch aptr. */
switch (type)
@@ -476,7 +476,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
if (status != ARES_SUCCESS)
return NULL;
printf("\t%s.", name);
- free(name);
+ ares_free_string(name);
break;
case T_HINFO:
@@ -500,13 +500,13 @@ static const unsigned char *display_rr(const unsigned char *aptr,
if (status != ARES_SUCCESS)
return NULL;
printf("\t%s.", name);
- free(name);
+ ares_free_string(name);
p += len;
status = ares_expand_name(p, abuf, alen, &name, &len);
if (status != ARES_SUCCESS)
return NULL;
printf("\t%s.", name);
- free(name);
+ ares_free_string(name);
break;
case T_MX:
@@ -520,7 +520,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
if (status != ARES_SUCCESS)
return NULL;
printf("\t%s.", name);
- free(name);
+ ares_free_string(name);
break;
case T_SOA:
@@ -532,13 +532,13 @@ static const unsigned char *display_rr(const unsigned char *aptr,
if (status != ARES_SUCCESS)
return NULL;
printf("\t%s.\n", name);
- free(name);
+ ares_free_string(name);
p += len;
status = ares_expand_name(p, abuf, alen, &name, &len);
if (status != ARES_SUCCESS)
return NULL;
printf("\t\t\t\t\t\t%s.\n", name);
- free(name);
+ ares_free_string(name);
p += len;
if (p + 20 > aptr + dlen)
return NULL;
@@ -592,7 +592,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
if (status != ARES_SUCCESS)
return NULL;
printf("\t%s.", name);
- free(name);
+ ares_free_string(name);
break;
default: