summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorQianqiang Liu <qianqiang.liu@163.com>2024-09-13 11:27:51 +0800
committerSteve French <stfrench@microsoft.com>2024-09-15 10:42:45 -0500
commit9b4af913465cc5f903227237d833b4911430fd97 (patch)
treebb74d71016e8f285745a1e74ac4f07e5b027bd1b /fs
parent590efcd3c75f0e1f7208cf1c8dff5452818b70f2 (diff)
smb: client: compress: fix an "illegal accesses" issue
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/smb/client/compress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/compress.c b/fs/smb/client/compress.c
index daf84e39861c..2c008e9f0206 100644
--- a/fs/smb/client/compress.c
+++ b/fs/smb/client/compress.c
@@ -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;