From a94aeb750376420d604921634bb288a08ada5957 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 16 May 2018 14:35:06 +1000 Subject: [PATCH] Further s_buf dealloc fixes on failed decompression. --- stream.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stream.c b/stream.c index 01b883a..c5628ce 100644 --- a/stream.c +++ b/stream.c @@ -483,7 +483,6 @@ static int bzip2_decompress_buf(rzip_control *control __UNUSED__, struct uncomp_ bzerr = BZ2_bzBuffToBuffDecompress((char*)ucthread->s_buf, &dlen, (char*)c_buf, ucthread->c_len, 0, 0); if (unlikely(bzerr != BZ_OK)) { print_err("Failed to decompress buffer - bzerr=%d\n", bzerr); - ucthread->s_buf = c_buf; ret = -1; goto out; } @@ -518,7 +517,6 @@ static int gzip_decompress_buf(rzip_control *control __UNUSED__, struct uncomp_t gzerr = uncompress(ucthread->s_buf, &dlen, c_buf, ucthread->c_len); if (unlikely(gzerr != Z_OK)) { print_err("Failed to decompress buffer - gzerr=%d\n", gzerr); - ucthread->s_buf = c_buf; ret = -1; goto out; } @@ -556,7 +554,6 @@ static int lzma_decompress_buf(rzip_control *control, struct uncomp_thread *ucth lzmaerr = LzmaUncompress(ucthread->s_buf, &dlen, c_buf, &c_len, control->lzma_properties, 5); if (unlikely(lzmaerr)) { print_err("Failed to decompress buffer - lzmaerr=%d\n", lzmaerr); - ucthread->s_buf = c_buf; ret = -1; goto out; } @@ -592,7 +589,6 @@ static int lzo_decompress_buf(rzip_control *control __UNUSED__, struct uncomp_th if (unlikely(lzerr != LZO_E_OK)) { print_err("Failed to decompress buffer - lzerr=%d\n", lzerr); dealloc(ucthread->s_buf); - ucthread->s_buf = c_buf; ret = -1; goto out; }