mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Phillip Lougher <phillip@squashfs.org.uk>
To: linux-kernel@vger.kernel.org
Cc: minchan@kernel.org, Phillip Lougher <phillip@squashfs.org.uk>
Subject: [PATCH 7/7] Squashfs: Check stream is not NULL in decompressor_multi.c
Date: Wed, 20 Nov 2013 01:48:10 +0000	[thread overview]
Message-ID: <1384912091-11092-7-git-send-email-phillip@squashfs.org.uk> (raw)
In-Reply-To: <1384912091-11092-1-git-send-email-phillip@squashfs.org.uk>

Fix static checker complaint that stream is not checked in
squashfs_decompressor_destroy().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Reviewed-by: Minchan Kim <minchan@kernel.org>
---
 fs/squashfs/decompressor_multi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/squashfs/decompressor_multi.c b/fs/squashfs/decompressor_multi.c
index ae54675..d6008a6 100644
--- a/fs/squashfs/decompressor_multi.c
+++ b/fs/squashfs/decompressor_multi.c
@@ -119,11 +119,10 @@ void squashfs_decompressor_destroy(struct squashfs_sb_info *msblk)
 			kfree(decomp_strm);
 			stream->avail_decomp--;
 		}
+		WARN_ON(stream->avail_decomp);
+		kfree(stream->comp_opts);
+		kfree(stream);
 	}
-
-	WARN_ON(stream->avail_decomp);
-	kfree(stream->comp_opts);
-	kfree(stream);
 }
 
 
-- 
1.8.3.2


      parent reply	other threads:[~2013-11-20  1:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  1:48 [PATCH 1/7] Squashfs: Refactor decompressor interface and code Phillip Lougher
2013-11-20  1:48 ` [PATCH 2/7] squashfs: Enhance parallel I/O Phillip Lougher
2013-11-20  1:48 ` [PATCH 3/7] Squashfs: add multi-threaded decompression using percpu variables (V2) Phillip Lougher
2013-11-20  8:33   ` Minchan Kim
2013-11-20  9:36     ` Phillip Lougher
2013-11-20  1:48 ` [PATCH 4/7] Squashfs: Generalise paging handling in the decompressors Phillip Lougher
2013-11-20  1:48 ` [PATCH 5/7] Squashfs: Restructure squashfs_readpage() Phillip Lougher
2013-11-20  1:48 ` [PATCH 6/7] Squashfs: Directly decompress into the page cache for file data Phillip Lougher
2013-11-22  7:40   ` Roman Peniaev
2013-11-24  1:19     ` Phillip Lougher
2013-11-20  1:48 ` Phillip Lougher [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384912091-11092-7-git-send-email-phillip@squashfs.org.uk \
    --to=phillip@squashfs.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®