Skip to content

Commit 590efcd

Browse files
Qianqiang Liusmfrench
authored andcommitted
smb: client: compress: fix a potential issue of freeing an invalid pointer
The dst pointer may not be initialized when calling kvfree(dst) Fixes: 13b68d4 ("smb: client: compress: LZ77 code improvements cleanup") Signed-off-by: Qianqiang Liu <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 94ae8c3 commit 590efcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/compress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ int smb_compress(struct TCP_Server_Info *server, struct smb_rqst *rq, compress_s
318318
{
319319
struct iov_iter iter;
320320
u32 slen, dlen;
321-
void *src, *dst;
321+
void *src, *dst = NULL;
322322
int ret;
323323

324324
if (!server || !rq || !rq->rq_iov || !rq->rq_iov->iov_base)

0 commit comments

Comments
 (0)