aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQianqiang Liu <[email protected]>2024-09-13 08:00:54 +0800
committerSteve French <[email protected]>2024-09-15 10:42:45 -0500
commit590efcd3c75f0e1f7208cf1c8dff5452818b70f2 (patch)
treeae7864d59584e8f7d0181d4a3ebc18c56c54ccb8
parent94ae8c3fee94a87bdf982d5559f8037c6c562657 (diff)
smb: client: compress: fix a potential issue of freeing an invalid pointer
The dst pointer may not be initialized when calling kvfree(dst) Fixes: 13b68d44990d9 ("smb: client: compress: LZ77 code improvements cleanup") Signed-off-by: Qianqiang Liu <[email protected]> Signed-off-by: Steve French <[email protected]>
-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 65d3d219e8bc..daf84e39861c 100644
--- a/fs/smb/client/compress.c
+++ b/fs/smb/client/compress.c
@@ -318,7 +318,7 @@ int smb_compress(struct TCP_Server_Info *server, struct smb_rqst *rq, compress_s
{
struct iov_iter iter;
u32 slen, dlen;
- void *src, *dst;
+ void *src, *dst = NULL;
int ret;
if (!server || !rq || !rq->rq_iov || !rq->rq_iov->iov_base)