Re: [PATCH] crypto: sa2ul - fix memory leak in sa_cra_init_aead()

From: Kamlesh Gurudasani
Date: Sun Aug 25 2024 - 07:59:08 EST


Ma Ke <make24@xxxxxxxxxxx> writes:

> Currently the resource allocated by crypto_alloc_shash() is not freed in
> case crypto_alloc_aead() fails, resulting in memory leak.
>
> Add crypto_free_shash() to fix it.
>
> Found by code review.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: d2c8ac187fc9 ("crypto: sa2ul - Add AEAD algorithm support")
> Signed-off-by: Ma Ke <make24@xxxxxxxxxxx>
LGTM.

Reviewed-by: Kamlesh Gurudasani <kamlesh@xxxxxx>