提交 73b8b085 编写于 作者: N Namjae Jeon

cifsd: change success handling to failure handling

Change success handling to failure handling in ksmbd_crypt_message().
Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 27aa646d
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册