From: Phillip Lougher Date: Sun, 10 Nov 2013 00:02:29 +0000 (+0000) Subject: Squashfs: Check stream is not NULL in decompressor_multi.c X-Git-Tag: firefly_0821_release~4090^2~60 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6a1e8fd1e4dc7c53d67f4091bea0cfd2139901d0;p=firefly-linux-kernel-4.4.55.git Squashfs: Check stream is not NULL in decompressor_multi.c Fix static checker complaint that stream is not checked in squashfs_decompressor_destroy(). Reported-by: Dan Carpenter Signed-off-by: Phillip Lougher Reviewed-by: Minchan Kim --- diff --git a/fs/squashfs/decompressor_multi.c b/fs/squashfs/decompressor_multi.c index ae54675a3526..d6008a636479 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); }