crypto: hisilicon - fixed memory allocation error
authorLongfang Liu <liulongfang@huawei.com>
Thu, 10 Sep 2020 11:56:43 +0000 (19:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:19 +0000 (10:08 +0100)
commit75d927fc55874b3098d6be8be0b4790a490bbe8f
tree28e1581f1490ba191238a24be9b06a27347e08cc
parentcde267085992e5cbe91a8f421b255724a82e2c63
crypto: hisilicon - fixed memory allocation error

[ Upstream commit 24efcec2919afa7d56f848c83a605b46c8042a53 ]

1. Fix the bug of 'mac' memory leak as allocating 'pbuf' failing.
2. Fix the bug of 'qps' leak as allocating 'qp_ctx' failing.

Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/hisilicon/sec2/sec_crypto.c