selinux: fix potential memleak in selinux_add_opt()
stable inclusion from stable-v5.10.94 commit b2b1b490bd2983c84566c94b4bf3b0e4279f3ea7 bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b2b1b490bd2983c84566c94b4bf3b0e4279f3ea7 -------------------------------- [ Upstream commit 2e08df3c ] This patch try to fix potential memleak in error branch. Fixes: ba641862 ("selinux: new helper - selinux_add_opt()") Signed-off-by: NBernard Zhao <bernard@vivo.com> [PM: tweak the subject line, add Fixes tag] Signed-off-by: NPaul Moore <paul@paul-moore.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录