EVM: fix memory leak of temporary buffer 'temp'
The allocation of 'temp' is not kfree'd and hence there is a memory leak on each call of evm_read_xattrs. Fix this by kfree'ing it after copying data from it back to the user space buffer 'buf'. Detected by CoverityScan, CID#1469386 ("Resource Leak") Fixes: fa516b66 ("EVM: Allow runtime modification of the set of verified xattrs") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
Showing
想要评论请 注册 或 登录