提交 0b496794 编写于 作者: W Wenkai Lin 提交者: JiangShui

crypto: hisilicon/sec - fix for resource leak

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7BANJ
CVE: NA

----------------------------------------------------------------------

The hisi_acc_sg_buf_unmap function is not executed
before return ret, causing resource leakage.
Signed-off-by: NWenkai Lin <linwenkai6@hisilicon.com>
Signed-off-by: NJiangShui Yang <yangjiangshui@h-partners.com>
上级 1c8c93f6
......@@ -984,6 +984,7 @@ static int sec_cipher_map(struct sec_ctx *ctx, struct sec_req *req,
ret = sec_aead_mac_init(a_req);
if (unlikely(ret)) {
dev_err(dev, "fail to init mac data for ICV!\n");
hisi_acc_sg_buf_unmap(dev, src, req->in);
return ret;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册