]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed memory leak related to retried requests.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 13 Jul 2010 16:49:48 +0000 (10:49 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 13 Jul 2010 16:49:48 +0000 (10:49 -0600)
ErrorState object was not destroyed if the failed request to the origin
server or peer was retried.

src/forward.cc

index a954803d05bf26be40366d948e3cffb642187e51..fcc5d009f4b462e6967816aef6a81cdfa20187d7 100644 (file)
@@ -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);