Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3 -4
+3 -4
fs/squashfs/decompressor_multi.c
··· 119 119 kfree(decomp_strm); 120 120 stream->avail_decomp--; 121 121 } 122 + WARN_ON(stream->avail_decomp); 123 + kfree(stream->comp_opts); 124 + kfree(stream); 122 125 } 123 - 124 - WARN_ON(stream->avail_decomp); 125 - kfree(stream->comp_opts); 126 - kfree(stream); 127 126 } 128 127 129 128