From: Amos Jeffries Date: Thu, 28 Mar 2013 03:16:05 +0000 (-0600) Subject: Fix memory leaks in ConnStateData pinning X-Git-Tag: SQUID_3_4_0_1~217 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=86e04dd564ee58dc3a5d72da99489518b5497ca3;p=thirdparty%2Fsquid.git Fix memory leaks in ConnStateData pinning ConnStateData does not cleanup any of the pinning child structure fields. This results in a leak of pinned host and peer details. Run the full un-pin cleanup operation from ConnStateData::swanSong in order to clean up all the pinning state instead of just the release the Comm::Connection. --- diff --git a/src/client_side.cc b/src/client_side.cc index 626018be25..25ed433d67 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -809,9 +809,7 @@ ConnStateData::swanSong() } #endif - if (Comm::IsConnOpen(pinning.serverConnection)) - pinning.serverConnection->close(); - pinning.serverConnection = NULL; + unpinConnection(); if (Comm::IsConnOpen(clientConnection)) clientConnection->close();