chiark / gitweb /
@@ -1,12 +1,15 @@
[adns] / src / query.c
index f805c9296565fe8b10920c15d144e31cd34457a9..e6bc7a0bf862e5c9a3e6b8321e7b290bf517b889 100644 (file)
@@ -195,7 +195,7 @@ static int save_owner(adns_query qu, const char *owner, int ol) {
 int adns_submit(adns_state ads,
                const char *owner,
                adns_rrtype type,
-               int flags,
+               adns_queryflags flags,
                void *context,
                adns_query *query_r) {
   int r, ol, ndots;
@@ -262,7 +262,7 @@ int adns_submit(adns_state ads,
 int adns_submit_reverse(adns_state ads,
                        const struct sockaddr *addr,
                        adns_rrtype type,
-                       int flags,
+                       adns_queryflags flags,
                        void *context,
                        adns_query *query_r) {
   const unsigned char *iaddr;
@@ -283,7 +283,7 @@ int adns_submit_reverse(adns_state ads,
 int adns_synchronous(adns_state ads,
                     const char *owner,
                     adns_rrtype type,
-                    int flags,
+                    adns_queryflags flags,
                     adns_answer **answer_r) {
   adns_query qu;
   int r;
@@ -390,6 +390,7 @@ static void free_query_allocs(adns_query qu) {
   for (an= qu->allocations.head; an; an= ann) { ann= an->next; free(an); }
   LIST_INIT(qu->allocations);
   adns__vbuf_free(&qu->vb);
+  free(qu->query_dgram);
 }
 
 void adns_cancel(adns_query qu) {
@@ -500,6 +501,7 @@ void adns__query_done(adns_query qu) {
     LIST_UNLINK(qu->ads->childw,parent);
     qu->ctx.callback(parent,qu);
     free_query_allocs(qu);
+    free(qu->answer);
     free(qu);
   } else {
     makefinal_query(qu);