commit | 1ddd8a6ab5d4c3608903137631c5818028aea019 | [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 | f6a073848e9b2bdcab6785c05f0aec6d5320e124 [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>