From: Ruediger Pluem Date: Wed, 15 Nov 2006 20:26:10 +0000 (+0000) Subject: * Ensure that we do not perform our final operations twice if a second EOS X-Git-Tag: 2.3.0~2023 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=653f3dd98b6092c4a9aee5f64b478454763caa57;p=apache * Ensure that we do not perform our final operations twice if a second EOS 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 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 0080424321..450354e64a 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -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