Skip to content
Commit 497e3a89 authored by Sergei Antonov's avatar Sergei Antonov Committed by Tom Rini
Browse files

hash: fix a memory leak



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: d7af2baa ("crypto/fsl: Fix HW accelerated hash commands")
Cc: Breno Lima <breno.lima@nxp.com>
Signed-off-by: default avatarSergei Antonov <saproj@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 45a00529
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment