aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-06-25 17:58:51 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:25:00 -0400
commit9a5f04bf798254390f89445ecf0b6f4c70ddc1f8 (patch)
treeed9aa17d9d980f3f013ccc84e12135c65b51757d /security/selinux/hooks.c
parenta2ba192c96d12447472e105890a9cd1b97952747 (diff)
[PATCH] selinux: kfree cleanup
kfree(NULL) is legal. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 932eef18db33..17a1189f1ff8 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1658,9 +1658,8 @@ static int selinux_bprm_secureexec (struct linux_binprm *bprm)
1658 1658
1659static void selinux_bprm_free_security(struct linux_binprm *bprm) 1659static void selinux_bprm_free_security(struct linux_binprm *bprm)
1660{ 1660{
1661 struct bprm_security_struct *bsec = bprm->security; 1661 kfree(bprm->security);
1662 bprm->security = NULL; 1662 bprm->security = NULL;
1663 kfree(bsec);
1664} 1663}
1665 1664
1666extern struct vfsmount *selinuxfs_mount; 1665extern struct vfsmount *selinuxfs_mount;