]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1553: Memleak in HTCP client code
authorserassio <>
Sat, 13 May 2006 01:27:11 +0000 (01:27 +0000)
committerserassio <>
Sat, 13 May 2006 01:27:11 +0000 (01:27 +0000)
Forward port of 2.5 changes.

src/htcp.cc

index f579588ff0afccefacedcfebfce78274660dcacc..3a09dd1cb2fccb86068ee65d2b59780187fb8cef 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: htcp.cc,v 1.66 2006/05/08 23:38:33 robertc Exp $
+ * $Id: htcp.cc,v 1.67 2006/05/12 19:27:11 serassio Exp $
  *
  * DEBUG: section 31    Hypertext Caching Protocol
  * AUTHOR: Duane Wesssels
@@ -785,6 +785,10 @@ htcpTstReply(htcpDataHeader * dhdr, StoreEntry * e, htcpSpecifier * spec, struct
 
     pkt = htcpBuildPacket(&stuff, &pktlen);
 
+    safe_free(stuff.D.resp_hdrs);
+    safe_free(stuff.D.entity_hdrs);
+    safe_free(stuff.D.cache_hdrs);
+
     if (pkt == NULL)
     {
         debug(31, 0) ("htcpTstReply: htcpBuildPacket() failed\n");