]> 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)
commitd8d877d7c772acf52089662f1b971c32293d1089
tree34c1acb7bb4be53c6899a9c7d2302747ad48b768
parent0de845ca16708c4f084d3b978cd0e2e7dcbb43df
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: d1d1d6788ff4c ("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