Skip to content

Commit ed4f381

Browse files
committed
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>
1 parent 0d455c1 commit ed4f381

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎fs/squashfs/decompressor_multi.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,10 @@ void squashfs_decompressor_destroy(struct squashfs_sb_info *msblk)
119119
kfree(decomp_strm);
120120
stream->avail_decomp--;
121121
}
122+
WARN_ON(stream->avail_decomp);
123+
kfree(stream->comp_opts);
124+
kfree(stream);
122125
}
123-
124-
WARN_ON(stream->avail_decomp);
125-
kfree(stream->comp_opts);
126-
kfree(stream);
127126
}
128127

129128

0 commit comments

Comments
 (0)