[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>
This commit is contained in:
Jesper Juhl
2005-06-25 14:58:51 -07:00
committed by Linus Torvalds
parent a2ba192c96
commit 9a5f04bf79
5 changed files with 14 additions and 28 deletions

View File

@@ -1658,9 +1658,8 @@ static int selinux_bprm_secureexec (struct linux_binprm *bprm)
static void selinux_bprm_free_security(struct linux_binprm *bprm)
{
struct bprm_security_struct *bsec = bprm->security;
kfree(bprm->security);
bprm->security = NULL;
kfree(bsec);
}
extern struct vfsmount *selinuxfs_mount;