lkml.org 
[lkml]   [2020]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] crypto: allwinner: sun8i-ce: fix two error path's memory leak
On Sun, Nov 15, 2020 at 07:08:07PM +0000, Corentin Labbe wrote:
> This patch fixes the following smatch warnings:
> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c:412
> sun8i_ce_hash_run() warn: possible memory leak of 'result'
> Note: "buf" is leaked as well.
>
> Furthermore, in case of ENOMEM, crypto_finalize_hash_request() was not
> called which was an error.
>
> Fixes: 56f6d5aee88d ("crypto: sun8i-ce - support hash algorithms")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
> .../crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 20 +++++++++++--------
> 1 file changed, 12 insertions(+), 8 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2020-11-20 08:00    [W:0.038 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site