Re: [PATCH] hash: fix a memory leak

2023-07-15 Thread Tom Rini
On Mon, Jun 12, 2023 at 10:59:10PM +0300, Sergei Antonov 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 H

Re: [PATCH] hash: fix a memory leak

2023-06-12 Thread Simon Glass
On Mon, 12 Jun 2023 at 21:01, Sergei Antonov 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 accelerate

[PATCH] hash: fix a memory leak

2023-06-12 Thread Sergei Antonov
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 Signed-off-by: Sergei Antonov