From: Alex Rousskov Date: Tue, 13 Jul 2010 16:49:48 +0000 (-0600) Subject: Fixed memory leak related to retried requests. X-Git-Tag: SQUID_3_2_0_1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80cd008f935e27d02ac20d328cd6b1f2d5d99653;p=thirdparty%2Fsquid.git Fixed memory leak related to retried requests. ErrorState object was not destroyed if the failed request to the origin server or peer was retried. --- diff --git a/src/forward.cc b/src/forward.cc index a954803d05..fcc5d009f4 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -528,7 +528,10 @@ FwdState::retryOrBail() /* Ditch error page if it was created before. * A new one will be created if there's another problem */ - err = NULL; + if (err) { + errorStateFree(err); + err = NULL; + } /* use eventAdd to break potential call sequence loops and to slow things down a little */ eventAdd("fwdConnectStart", fwdConnectStartWrapper, this, originserver ? 0.05 : 0.005, 0);