]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
smb: client: compress: fix an "illegal accesses" issue
authorQianqiang Liu <qianqiang.liu@163.com>
Fri, 13 Sep 2024 03:27:51 +0000 (11:27 +0800)
committerSteve French <stfrench@microsoft.com>
Sun, 15 Sep 2024 15:42:45 +0000 (10:42 -0500)
Using uninitialized value "bkt" when calling "kfree"

Fixes: 13b68d44990d ("smb: client: compress: LZ77 code improvements cleanup")
Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/compress.c

index daf84e39861cbec2f5760f06485860d4f7d82698..2c008e9f0206f588435d4269e4eb995d2e4488a2 100644 (file)
@@ -233,7 +233,7 @@ static int collect_sample(const struct iov_iter *iter, ssize_t max, u8 *sample)
 static int is_compressible(const struct iov_iter *data)
 {
        const size_t read_size = SZ_2K, bkt_size = 256, max = SZ_4M;
-       struct bucket *bkt;
+       struct bucket *bkt = NULL;
        int i = 0, ret = 0;
        size_t len;
        u8 *sample;