chiark / gitweb /
+ Core library bugfixes:
authorian <ian>
Tue, 2 Nov 1999 22:22:43 +0000 (22:22 +0000)
committerian <ian>
Tue, 2 Nov 1999 22:22:43 +0000 (22:22 +0000)
@@ -1,12 +1,15 @@
 adns (0.6) unstable; urgency=high

-  Bugfixes:
+  Core library bugfixes:
   * Do not fail assertion if _qf_owner, _qf_search, domain ends in `.'.
   * Avoid infinite timeouts, causing lockup, when they should be zero !
   * TCP handling revamped (avoids recursive-invocation problems).
+  * Two memory leaks (one in all queries, one in cancelled ones) fixed.
+
+  Test and client program bug and portability fixes:
   * Dynamic library building works properly.
   * adnshost prints somewhat better messages about some wrong usages.
-  * Include stdlib.h in adnshost.h.
+  * Include <stdlib.h> and <sys/types.h> in adnshost.h.
   * adnslogres: parsing and error checking improved (Tony Finch).
   * Regresion tests can cope with zero-length reads.

changelog
client/adnshost.h
src/query.c

index 2a402b13fb84dba271ed1ed3cb068f4c811b3f6e..2f292b1d95d2920934483dc868c9add4e601f6b8 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,12 +1,15 @@
 adns (0.6) unstable; urgency=high
 
-  Bugfixes:
+  Core library bugfixes:
   * Do not fail assertion if _qf_owner, _qf_search, domain ends in `.'.
   * Avoid infinite timeouts, causing lockup, when they should be zero !
   * TCP handling revamped (avoids recursive-invocation problems).
+  * Two memory leaks (one in all queries, one in cancelled ones) fixed.
+
+  Test and client program bug and portability fixes:
   * Dynamic library building works properly.
   * adnshost prints somewhat better messages about some wrong usages.
-  * Include stdlib.h in adnshost.h.
+  * Include <stdlib.h> and <sys/types.h> in adnshost.h.
   * adnslogres: parsing and error checking improved (Tony Finch).
   * Regresion tests can cope with zero-length reads.
 
index cbde4c2d9046260ea842074001bf4087ddac9d49..8b459b35c070b185f63f780b45a85b17e0f571d9 100644 (file)
@@ -37,6 +37,7 @@
 #include <stdlib.h>
 #include <assert.h>
 
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
index 640d10ceeee8d25144f615ceb107a728c726dfd1..e6bc7a0bf862e5c9a3e6b8321e7b290bf517b889 100644 (file)
@@ -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);