summaryrefslogtreecommitdiff
path: root/crypto/essiv.c
diff options
context:
space:
mode:
authorChen Wandun <chenwandun@huawei.com>2019-11-16 14:51:00 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-11-22 18:48:38 +0800
commitc6ff5284b798cc79fa4a70e97d2b748d6a2a7bfe (patch)
tree3cefc203e658b599093743795c166d14ea1ed3ca /crypto/essiv.c
parenteddfd35872ed3cb6365f9b19aeb0174d57f19a2f (diff)
downloadlinux-crypto-c6ff5284b798cc79fa4a70e97d2b748d6a2a7bfe.tar.gz
linux-crypto-c6ff5284b798cc79fa4a70e97d2b748d6a2a7bfe.zip
crypto: essiv - remove redundant null pointer check before kfree
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>
Diffstat (limited to 'crypto/essiv.c')
-rw-r--r--crypto/essiv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/essiv.c b/crypto/essiv.c
index fc248de8..808f2b36 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);
}