From 4937da0d9d498690ebdbd007ebde453a1733591f Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 23 Mar 2018 08:14:44 +0800 Subject: crypto: lrw - Free rctx->ext with kzfree The buffer rctx->ext contains potentially sensitive data and should be freed with kzfree. Cc: Fixes: f96ee41be16a ("crypto: lrw - Convert to skcipher") Reported-by: Dan Carpenter Signed-off-by: Herbert Xu --- crypto/lrw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/lrw.c') diff --git a/crypto/lrw.c b/crypto/lrw.c index a09cdaa6..954a7064 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c @@ -317,7 +317,7 @@ static void exit_crypt(struct skcipher_request *req) rctx->left = 0; if (rctx->ext) - kfree(rctx->ext); + kzfree(rctx->ext); } static int do_encrypt(struct skcipher_request *req, int err) -- cgit v1.2.3