commit | 497e3a89ba46e0f1b1e7772bbd1e1a4c3fff17a5 | [log] [tgz] |
---|---|---|
author | Sergei Antonov <saproj@gmail.com> | Mon Jun 12 22:59:10 2023 +0300 |
committer | Tom Rini <trini@konsulko.com> | Fri Jul 14 15:21:07 2023 -0400 |
tree | d13710d49e6637eb15720294bd276779307f8ddb | |
parent | 45a0052939927fbae35e419a7591877c41a06163 [diff] |
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: d7af2baa49c6 ("crypto/fsl: Fix HW accelerated hash commands") Cc: Breno Lima <breno.lima@nxp.com> Signed-off-by: Sergei Antonov <saproj@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>