mirror of
https://github.com/torvalds/linux.git
synced 2026-05-21 21:37:25 +02:00
ksmbd: use aead_request_free to match aead_request_alloc
Use aead_request_free() instead of kfree() to properly free memory
allocated by aead_request_alloc(). This ensures sensitive crypto data
is zeroed before being freed.
Fixes: e2f34481b2 ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
1a81ea738c
commit
6171063e9d
|
|
@ -1218,7 +1218,7 @@ int ksmbd_crypt_message(struct ksmbd_work *work, struct kvec *iov,
|
|||
free_sg:
|
||||
kfree(sg);
|
||||
free_req:
|
||||
kfree(req);
|
||||
aead_request_free(req);
|
||||
free_ctx:
|
||||
ksmbd_release_crypto_ctx(ctx);
|
||||
return rc;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user