From: Amos Jeffries Date: Wed, 14 Jul 2010 23:42:01 +0000 (-0600) Subject: Author: Alex Rousskov X-Git-Tag: SQUID_3_1_5_1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b424120b743f491d588270a7dad0ba79c76e7467;p=thirdparty%2Fsquid.git Author: Alex Rousskov 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 9b0006af4e..92c6c55886 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -527,7 +527,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);