aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
authorHimanshu Shukla <himanshu.sh@samsung.com>2016-11-10 16:17:02 +0530
committerCasey Schaufler <casey@schaufler-ca.com>2016-11-10 11:22:06 -0800
commitb437aba85b5c4689543409d8407c016749231aae (patch)
tree9f03c18907323f8703571b2e87dc31cd83907152 /security/selinux
parentSMACK: Do not apply star label in smack_setprocattr hook (diff)
downloadlinux-dev-b437aba85b5c4689543409d8407c016749231aae.tar.xz
linux-dev-b437aba85b5c4689543409d8407c016749231aae.zip
SMACK: Fix the memory leak in smack_cred_prepare() hook
Memory leak in smack_cred_prepare()function. smack_cred_prepare() hook returns error if there is error in allocating memory in smk_copy_rules() or smk_copy_relabel() function. If smack_cred_prepare() function returns error then the calling function should call smack_cred_free() function for cleanup. In smack_cred_free() function first credential is extracted and then all rules are deleted. In smack_cred_prepare() function security field is assigned in the end when all function return success. But this function may return before and memory will not be freed. Signed-off-by: Himanshu Shukla <himanshu.sh@samsung.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/selinux')
0 files changed, 0 insertions, 0 deletions