From: serassio <> Date: Sat, 13 May 2006 01:27:11 +0000 (+0000) Subject: Bug #1553: Memleak in HTCP client code X-Git-Tag: SQUID_3_0_PRE4~137 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0203ca6d7f8affcc572b32576f04e6e0e46cf77d;p=thirdparty%2Fsquid.git Bug #1553: Memleak in HTCP client code Forward port of 2.5 changes. --- diff --git a/src/htcp.cc b/src/htcp.cc index f579588ff0..3a09dd1cb2 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -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");