aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
Diffstat (limited to 'ares')
-rw-r--r--ares/ares_search.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ares/ares_search.c b/ares/ares_search.c
index dab42368a..96a2f1f91 100644
--- a/ares/ares_search.c
+++ b/ares/ares_search.c
@@ -124,7 +124,12 @@ void ares_search(ares_channel channel, const char *name, int dnsclass,
free(s);
}
else
+ {
+ /* failed, free the malloc()ed memory */
+ free(squery->name);
+ free(squery);
callback(arg, status, NULL, 0);
+ }
}
}