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:Xiu Jianfeng <xiujianfeng@huawei.com> [PM: subject line tweak] Signed-off-by:
Paul Moore <paul@paul-moore.com>
Showing
Please register or sign in to comment