Re: [PATCH] [v2] evm: Fix memleak in init_desc

2021-01-13 Thread Mimi Zohar
Hi Dinghao, On Sun, 2021-01-10 at 16:02 +0800, Dinghao Liu wrote: > When kmalloc() fails, tmp_tfm allocated by > crypto_alloc_shash() has not been freed, which > leads to memleak. > > Fixes: d46eb3699502b ("evm: crypto hash replaced by shash") > Signed-off-by: Dinghao Liu This patch is now queu

[PATCH] [v2] evm: Fix memleak in init_desc

2021-01-10 Thread Dinghao Liu
When kmalloc() fails, tmp_tfm allocated by crypto_alloc_shash() has not been freed, which leads to memleak. Fixes: d46eb3699502b ("evm: crypto hash replaced by shash") Signed-off-by: Dinghao Liu --- Changelog: v2: - Remove checks against tmp_tfm before freeing. --- security/integrity/evm/evm_c