“1da177e4c3f41524e886b7f1b8a0c1fc7321cac2”上不存在“arch/m32r/include/asm/dma.h”
提交 067d2521 编写于 作者: J Jianglei Nie 提交者: Mimi Zohar

ima: Fix potential memory leak in ima_init_crypto()

On failure to allocate the SHA1 tfm, IMA fails to initialize and exits
without freeing the ima_algo_array. Add the missing kfree() for
ima_algo_array to avoid the potential memory leak.
Signed-off-by: NJianglei Nie <niejianglei2021@163.com>
Fixes: 6d94809a ("ima: Allocate and initialize tfm for each PCR bank")
Signed-off-by: NMimi Zohar <zohar@linux.ibm.com>
上级 af16df54
......@@ -205,6 +205,7 @@ int __init ima_init_crypto(void)
crypto_free_shash(ima_algo_array[i].tfm);
}
kfree(ima_algo_array);
out:
crypto_free_shash(ima_shash_tfm);
return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册