* modules/filters/mod_deflate.c (deflate_in_filter): Handle FLUSH in
the input brigade even if done inflating (ctx->done is true), but
don't try to flush the inflate stream in that case.  (Caught by
Coverity)
Github: closes
@@ -1316,6 +1316,7 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
if (APR_BUCKET_IS_FLUSH(bkt)) {
apr_bucket *tmp_b;
+ if (!ctx->done) {
ctx->inflate_total += ctx->stream.avail_out;
zRC = inflate(&(ctx->stream), Z_SYNC_FLUSH);
ctx->inflate_total -= ctx->stream.avail_out;
@@ -1348,6 +1349,7 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
consume_buffer(ctx, c, c->bufferSize - ctx->stream.avail_out,
UPDATE_CRC, ctx->proc_bb);
+ }
/* Flush everything so far in the returning brigade, but continue
* reading should EOS/more follow (don't lose them).
