Skip to content
Commit 73de1bef authored by Xiu Jianfeng's avatar Xiu Jianfeng Committed by Paul Moore
Browse files

selinux: fix memleak in security_read_state_kernel()



In this function, it directly returns the result of __security_read_policy
without freeing the allocated memory in *data, cause memory leak issue,
so free the memory if __security_read_policy failed.

Signed-off-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
[PM: subject line tweak]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 8d6d51ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment