lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0
[linux-2.6-microblaze.git] / lib / zlib_dfltcc / dfltcc_deflate.c
index dc85ec8..211d344 100644 (file)
@@ -142,7 +142,8 @@ again:
         /* Clear history. */
         if (flush == Z_FULL_FLUSH)
             param->hl = 0;
-        *result = need_more;
+        /* Trigger block post-processing if necessary. */
+        *result = no_flush ? need_more : block_done;
         return 1;
     }