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:
Родитель
27aa646db0
Коммит
73b8b08539
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче