From: Alex Rousskov Date: Fri, 10 Sep 2010 22:01:36 +0000 (-0600) Subject: Fixed an idnsGrokReply memory leak when merging DNS AAAA and A answers. X-Git-Tag: take1~282 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8be70f521ad80053dab4c909a1c15bb92e569ad1;p=thirdparty%2Fsquid.git 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. --- diff --git a/src/dns_internal.cc b/src/dns_internal.cc index b2668dc477..e338ccfeaa 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1106,6 +1106,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) {