mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
cifsd: change success handling to failure handling
Change success handling to failure handling in ksmbd_crypt_message(). Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
27aa646db0
commit
73b8b08539
1 changed files with 5 additions and 1 deletions
|
@ -1331,9 +1331,13 @@ int ksmbd_crypt_message(struct ksmbd_conn *conn, struct kvec *iov,
|
|||
rc = crypto_aead_encrypt(req);
|
||||
else
|
||||
rc = crypto_aead_decrypt(req);
|
||||
if (!rc && enc)
|
||||
if (rc)
|
||||
goto free_iv;
|
||||
|
||||
if (enc)
|
||||
memcpy(&tr_hdr->Signature, sign, SMB2_SIGNATURE_SIZE);
|
||||
|
||||
free_iv:
|
||||
kfree(iv);
|
||||
free_sg:
|
||||
kfree(sg);
|
||||
|
|
Loading…
Reference in a new issue