]> git.baikalelectronics.ru Git - kernel.git/commit
evm: Fix memleak in init_desc
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Sun, 10 Jan 2021 08:02:53 +0000 (16:02 +0800)
committerMimi Zohar <zohar@linux.ibm.com>
Wed, 13 Jan 2021 12:22:12 +0000 (07:22 -0500)
commit62719a825782ef38356054dff8ec39d52e6c15e7
tree34c1acb7bb4be53c6899a9c7d2302747ad48b768
parent23a2b9809c00c14636d193186909bff30026c39d
evm: Fix memleak in init_desc

tmp_tfm is allocated, but not freed on subsequent kmalloc failure, which
leads to a memory leak.  Free tmp_tfm.

Fixes: 5fd9e76310d3d ("evm: crypto hash replaced by shash")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
[zohar@linux.ibm.com: formatted/reworded patch description]
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/evm/evm_crypto.c