]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 23 Sep 2010 13:50:09 +0000 (07:50 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Thu, 23 Sep 2010 13:50:09 +0000 (07:50 -0600)
Fixed an idnsGrokReply memory leak when merging DNS AAAA and A answers.

We were not updating message->ancount after force-feeding the A message
with answers from the old AAAA message.

src/dns_internal.cc

index 54a9c6713a26d5e3995e555dfe1a5ba0d374eba2..7557b0b14e4a22b5de2a936950af47f6c7058092 100644 (file)
@@ -1110,6 +1110,7 @@ idnsGrokReply(const char *buf, size_t sz)
         safe_free(message->answer);
 
         message->answer = result;
+        message->ancount += q->initial_AAAA.count;
         n += q->initial_AAAA.count;
         q->initial_AAAA.count=0;
     } else if (q->initial_AAAA.count > 0 && n <= 0) {