diff options
| author | Phillip Lougher <phillip@squashfs.org.uk> | 2013-11-10 00:02:29 +0000 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 11:00:18 +0200 |
| commit | 416888f75da30d86a87694a669ed523ae20ced9d (patch) | |
| tree | 405982e70f6287911e9cafa3749941220f2c64c2 /fs | |
| parent | 34126a0b50dd795573a2346d5a51baa8aee8d5b9 (diff) | |
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 <dan.carpenter@oracle.com>
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Change-Id: I673b0f5f560c525fb7133c01af4d34e5ed359e36
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/squashfs/decompressor_multi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/squashfs/decompressor_multi.c b/fs/squashfs/decompressor_multi.c index ae54675a3..d6008a636 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); } |
