]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 14 Jul 2010 23:42:01 +0000 (17:42 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Wed, 14 Jul 2010 23:42:01 +0000 (17:42 -0600)
Fixed memory leak related to retried requests.

ErrorState object was not destroyed if the failed request to the origin
server or peer was retried.

src/forward.cc

index 9b0006af4ed029753cee78f344faa232a788728b..92c6c5588600a883c1a7dd929b546a7dc91bc6f3 100644 (file)
@@ -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);