Skip to content

Commit e18036d

Browse files
Chen Wandunherbertx
authored andcommitted
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 57d8154 commit e18036d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crypto/essiv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ static void essiv_aead_done(struct crypto_async_request *areq, int err)
188188
struct aead_request *req = areq->data;
189189
struct essiv_aead_request_ctx *rctx = aead_request_ctx(req);
190190

191-
if (rctx->assoc)
192-
kfree(rctx->assoc);
191+
kfree(rctx->assoc);
193192
aead_request_complete(req, err);
194193
}
195194

0 commit comments

Comments
 (0)