[PATCH] hash: fix a memory leak
Simon Glass
sjg at chromium.org
Mon Jun 12 23:17:41 CEST 2023
On Mon, 12 Jun 2023 at 21:01, Sergei Antonov <saproj at gmail.com> wrote:
>
> memalign() returns a pointer which is to be freed by free(). To call
> unmap_sysmem() is incorrect, furthermore it was called in a wrong scope.
>
> Also add a check for allocation error.
>
> Fixes: d7af2baa49c6 ("crypto/fsl: Fix HW accelerated hash commands")
> Cc: Breno Lima <breno.lima at nxp.com>
> Signed-off-by: Sergei Antonov <saproj at gmail.com>
> ---
> common/hash.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list