[PATCH 7/7] Squashfs: Check stream is not NULL in decompressor_multi.c

From: Phillip Lougher
Date: Tue Nov 19 2013 - 20:49:04 EST


Fix static checker complaint that stream is not checked in
squashfs_decompressor_destroy().

Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Phillip Lougher <phillip@xxxxxxxxxxxxxxx>
Reviewed-by: Minchan Kim <minchan@xxxxxxxxxx>
---
fs/squashfs/decompressor_multi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/squashfs/decompressor_multi.c b/fs/squashfs/decompressor_multi.c
index ae54675..d6008a6 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);
}


--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/