1
0
mirror of https://github.com/facebook/zstd.git synced 2025-11-02 09:13:20 +03:00

Fix missing squashfs_finish_page's

This commit is contained in:
Sean Purcell
2017-04-27 17:19:20 -07:00
parent eeeb201e70
commit c7e107197a
2 changed files with 13 additions and 9 deletions

View File

@@ -104,6 +104,7 @@ static int zstd_uncompress(struct squashfs_sb_info *msblk, void *strm,
if (out_buf.dst == NULL) {
/* shouldn't run out of pages before stream is
* done */
squashfs_finish_page(output);
goto out;
}
out_buf.pos = 0;
@@ -118,13 +119,14 @@ static int zstd_uncompress(struct squashfs_sb_info *msblk, void *strm,
put_bh(bh[k++]);
} while (zstd_err != 0 && !ZSTD_isError(zstd_err));
squashfs_finish_page(output);
if (ZSTD_isError(zstd_err)) {
ERROR("zstd decompression error: %d\n",
(int)ZSTD_getErrorCode(zstd_err));
goto out;
}
squashfs_finish_page(output);
if (k < b)
goto out;