Squashfs: Check stream is not NULL in decompressor_multi.c
authorPhillip Lougher <phillip@squashfs.org.uk>
Sun, 10 Nov 2013 00:02:29 +0000 (00:02 +0000)
committerPhillip Lougher <phillip@squashfs.org.uk>
Wed, 20 Nov 2013 03:59:20 +0000 (03:59 +0000)
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

index ae54675a352660bf93e266f9fc1b75f7584f03f2..d6008a636479649639f4ecee6a74545d3055fc34 100644 (file)
@@ -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);
 }