summaryrefslogtreecommitdiff
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-06-25 14:58:51 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 16:25:00 -0700
commit9a5f04bf798254390f89445ecf0b6f4c70ddc1f8 (patch)
treeed9aa17d9d980f3f013ccc84e12135c65b51757d /security/selinux/hooks.c
parenta2ba192c96d12447472e105890a9cd1b97952747 (diff)
downloadlwn-9a5f04bf798254390f89445ecf0b6f4c70ddc1f8.tar.gz
lwn-9a5f04bf798254390f89445ecf0b6f4c70ddc1f8.zip
[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)
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;