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:12:10 +0000 (10:12 +0100)
commitba628cf85aabdd977f0a6a6abf3ba58b3dd4888f
tree20f7697b9eeafd2ce50efa9a172f28da318ecbef
parent88b7969b252eb839d2ef55398adc5e6869b92038
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