diff options
author | Chen Wandun <chenwandun@huawei.com> | 2019-11-16 14:51:00 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 16:43:39 +0100 |
commit | bfef5e3e73757025c72ccd5d8424cc92424151ab (patch) | |
tree | ff484afe2d432650fc9d731a42c6f2c267109c95 /crypto | |
parent | 2d1ac2f2e2be27ba11edb65f6ef42f23ca5e10e9 (diff) |
crypto: essiv - remove redundant null pointer check before kfree
[ Upstream commit e18036da5c23530994faf7243b592e581f1efed2 ]
kfree has taken null pointer check into account. so it is safe to
remove the unnecessary check.
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: b5a772adf45a ("crypto: essiv - Handle EBUSY correctly")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/essiv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/essiv.c b/crypto/essiv.c index a8befc8fb06e..3d3f9d7f607c 100644 --- a/crypto/essiv.c +++ b/crypto/essiv.c @@ -188,8 +188,7 @@ static void essiv_aead_done(struct crypto_async_request *areq, int err) struct aead_request *req = areq->data; struct essiv_aead_request_ctx *rctx = aead_request_ctx(req); - if (rctx->assoc) - kfree(rctx->assoc); + kfree(rctx->assoc); aead_request_complete(req, err); } |