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

2021-01-09 Thread dinghao . liu
> On Sun, Jan 10, 2021 at 01:27:09PM +0800, dinghao@zju.edu.cn wrote: > > > On Sat, Jan 09, 2021 at 07:33:05PM +0800, Dinghao Liu wrote: > > > > When kmalloc() fails, tmp_tfm allocated by > > > > crypto_alloc_shash() has not been freed, which > > > > leads to memleak. > > > > > > > > Fixes: d4

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

2021-01-09 Thread Eric Biggers
On Sun, Jan 10, 2021 at 01:27:09PM +0800, dinghao@zju.edu.cn wrote: > > On Sat, Jan 09, 2021 at 07:33:05PM +0800, Dinghao Liu wrote: > > > When kmalloc() fails, tmp_tfm allocated by > > > crypto_alloc_shash() has not been freed, which > > > leads to memleak. > > > > > > Fixes: d46eb3699502b ("

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

2021-01-09 Thread dinghao . liu
> On Sat, Jan 09, 2021 at 07:33:05PM +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 > > --- > > se

Re: [PATCH] evm: Fix memleak in init_desc

2021-01-09 Thread Eric Biggers
On Sat, Jan 09, 2021 at 07:33:05PM +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 > --- > security/integrity/e

[PATCH] evm: Fix memleak in init_desc

2021-01-09 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 --- security/integrity/evm/evm_crypto.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-