]> granicus.if.org Git - apache/commitdiff
* Ensure that we do not perform our final operations twice if a second EOS
authorRuediger Pluem <rpluem@apache.org>
Wed, 15 Nov 2006 20:26:10 +0000 (20:26 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 15 Nov 2006 20:26:10 +0000 (20:26 +0000)
  falls down the chain by accident. Otherwise we are likely to run in a
  SEGFAULT. So remove ourselves from the chain.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@475406 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_deflate.c

index 008042432120ff0c5cb3dd292ea7a536ccab5b69..450354e64a18745694eb329343e8f76420becffe 100644 (file)
@@ -1001,6 +1001,12 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
         e = APR_BRIGADE_FIRST(bb);
 
         if (APR_BUCKET_IS_EOS(e)) {
+            /*
+             * We are really done now. Ensure that we never return here, even
+             * if a second EOS bucket falls down the chain. Thus remove
+             * ourselves.
+             */
+            ap_remove_output_filter(f);
             ctx->stream.avail_in = 0; /* should be zero already anyway */
             /*
              * Flush the remaining data from the zlib buffers. It is correct